[postgis-devel] [postgis-tickets] [SCM] PostGIS branch stable-3.2 updated. 3.2.1-22-g553226efa

Sandro Santilli strk at kbt.io
Mon Jun 6 03:30:55 PDT 2022


On Tue, May 31, 2022 at 08:19:01AM -0700, git at osgeo.org wrote:
> commit 2e416908a1eac7343f160fa5d2f0da332f34e3de
> Author: Paul Ramsey <pramsey at cleverelephant.ca>
> Date:   Tue May 31 08:18:43 2022 -0700
> 
>     Quiet warnings in CI
> 
> diff --git a/loader/pgsql2shp-core.c b/loader/pgsql2shp-core.c
> index 4a3d593de..be624c4d1 100644
> --- a/loader/pgsql2shp-core.c
> +++ b/loader/pgsql2shp-core.c
> @@ -1352,8 +1352,10 @@ ShpDumperOpenTable(SHPDUMPERSTATE *state)
>  	/* If a user-defined query has been specified, create and point the state to our new table */
>  	if (state->config->usrquery)
>  	{
> -		asprintf(&(state->table), "__pgsql2shp%lu_tmp_table", (long)getpid());
> -		asprintf(&query, "CREATE TEMP TABLE \"%s\" AS %s", state->table, state->config->usrquery);
> +		int r = asprintf(&(state->table), "__pgsql2shp%lu_tmp_table", (long)getpid());
> +		(void)r;
> +		r = asprintf(&query, "CREATE TEMP TABLE \"%s\" AS %s", state->table, state->config->usrquery);
> +		(void)r;

Since we're there, that `r` integer could be checked for being != -1
as that would indicate an error.

--strk;

  Libre GIS consultant/developer
  https://strk.kbt.io/services.html


More information about the postgis-devel mailing list