[postgis-tickets] [PostGIS] #5399: address_standardizer compile time warnings
PostGIS
trac at osgeo.org
Mon Jun 12 07:52:03 PDT 2023
#5399: address_standardizer compile time warnings
---------------------+---------------------------
Reporter: strk | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.4.0
Component: postgis | Version: master
Keywords: |
---------------------+---------------------------
I get many:
{{{
../.././../../extensions/address_standardizer/address_standardizer.c:207:7:
warning: unused variable 'ruleref' [-Wunused-variable]
KW *ruleref = __cur_stz__->build_key;
^
../.././../../extensions/address_standardizer/address_standardizer.c:68:26:
warning: unused variable 'values' [-Wunused-variable]
char **values;
^
2 warnings generated.
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-
statement -Werror=vla -Wendif-labels -Wmissing-format-attribute
-Wimplicit-fallthrough=3 -Wformat-security -fno-strict-aliasing -fwrapv
-fexcess-precision=standard -Wno-format-truncation -Wno-stringop-
truncation -g -g -O2 -flto=auto -ffat-lto-objects -fstack-protector-strong
-Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -std=gnu99
-O2 -g -Wall -fno-math-errno -fno-signed-zeros -Wall -flto
-I/usr/local/include -I/opt/proj-9.1/include -I/usr/include/x86_64-linux-
gnu -I/usr/include/libxml2 -I/usr/include -I/usr/include/json-c -DNDEBUG
-DPCRE_VERSION=2 -I. -I./ -I/usr/include/postgresql/13/server
-I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2
-D_GNU_SOURCE -I/usr/include/libxml2 -c -o address_standardizer.o
../.././../../extensions/address_standardizer/address_standardizer.c
../.././../../extensions/address_standardizer/address_standardizer.c: In
function ‘debug_standardize_address’:
../.././../../extensions/address_standardizer/address_standardizer.c:94:17:
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-
statement]
94 | int err;
| ^~~
../.././../../extensions/address_standardizer/address_standardizer.c:151:5:
warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
151 | if (!std)
| ^~
../.././../../extensions/address_standardizer/address_standardizer.c:155:9:
note: ...this statement, but the latter is misleadingly indented as if it
were guarded by the ‘if’
155 | STAND_PARAM *ms = std->misc_stand;
| ^~~~~~~~~~~
../.././../../extensions/address_standardizer/address_standardizer.c:155:9:
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-
statement]
../.././../../extensions/address_standardizer/address_standardizer.c:160:9:
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-
statement]
160 | DEF *__def__ ;
| ^~~
../.././../../extensions/address_standardizer/address_standardizer.c:168:9:
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-
statement]
168 | int started = 0;
| ^~~
../.././../../extensions/address_standardizer/address_standardizer.c:205:17:
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-
statement]
205 | STZ *__cur_stz__ = __stz_list__[stz_no] ;
| ^~~
../.././../../extensions/address_standardizer/address_standardizer.c:207:21:
warning: unused variable ‘ruleref’ [-Wunused-variable]
207 | KW *ruleref = __cur_stz__->build_key;
| ^~~~~~~
../.././../../extensions/address_standardizer/address_standardizer.c:68:26:
warning: unused variable ‘values’ [-Wunused-variable]
68 | char **values;
| ^~~~~~
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5399>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list