From: Sandro Santilli Date: Mon, 3 Jun 2013 17:45:21 +0000 (+0000) Subject: Another couple of warnings gone X-Git-Tag: 2.1.0beta3~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1f68c71ae065d591f22ea8559e5091772980e37;p=postgis Another couple of warnings gone git-svn-id: http://svn.osgeo.org/postgis/trunk@11513 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/gserialized_estimate.c b/postgis/gserialized_estimate.c index d0aed06ca..4e9460064 100644 --- a/postgis/gserialized_estimate.c +++ b/postgis/gserialized_estimate.c @@ -860,12 +860,15 @@ pg_get_nd_stats_by_name(const Oid table_oid, const text *att_text, int mode) { /* Get the attribute number */ att_num = get_attnum(table_oid, att_name); - if ( ! att_num ) + if ( ! att_num ) { elog(ERROR, "attribute \"%s\" does not exist", att_name); + return NULL; + } } else { elog(ERROR, "attribute name is null"); + return NULL; } return pg_get_nd_stats(table_oid, att_num, mode); @@ -1889,7 +1892,7 @@ Datum _postgis_gserialized_stats(PG_FUNCTION_ARGS) ND_STATS *nd_stats; char *str; text *json; - int mode; + int mode = 2; /* default to 2D mode */ /* Check if we've been asked to not use 2d mode */ if ( ! PG_ARGISNULL(2) )