Hello,
> and the output is at
> https://mail.aegee.org/dpa/scan-build-pg-628462bda9/
I had a quick look on 'src/bin/pgbench/pgbench.c' 4 warnings:
One seems indeed to be an unused assignment ("command" variable
assignment on line 2286) and could be removed, although a cleaner
solution would be to use per-block "command" variables instead of a shared
global one, but pg switch indentation rules would shift the code too much
to my taste.
The other three about undefined variables just demonstrate that clang does
not understand the code: it does not get that the argc counter counts
arguments so that it is fine to use the corresponding offsets (while loop
on 3301, uses afterwards).
The fact could be hidden from clang by zero filling the offset array to
make clang believe that the array is initialized, but that would be just
reassuring it without really improving anything.
None of these four issues are "bugs" in any sense, IMHO, they just proove
that static analysis can generate more noise than signal when applied
roughtly.
--
Fabien.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs