On 12/21/17, Brian Kambach <bkamb...@cryptonitenxt.com> wrote:
> We recently upgraded sqlite from 3.19.3 to 3.21.0 and now building with
> '-Wall -Werror' fails (when it previously succeeded):
>
> $ gcc -O3 -Wall -Werror -fno-delete-null-pointer-checks -c -o sqlite3.o
> sqlite3.c
> sqlite3.c: In function 'exprAnalyze':
> sqlite3.c:131526:37: error: 'pLeft' may be used uninitialized in this
> function [-Werror=maybe-uninitialized]
>          pNewTerm->leftCursor = pLeft->iTable;
>                                      ^
> sqlite3.c:131529:28: error: 'eOp2' may be used uninitialized in this
> function [-Werror=maybe-uninitialized]
>          pNewTerm->eMatchOp = eOp2;
>                             ^
> cc1: all warnings being treated as errors
>
> I also noticed that sqlite3.c compiles successfully with -O0, but fails with
> -O1, -O2, or -O3.
>
> We compile everything with -Werror, so I'm hoping the answer is not "don't
> use -Werror".

Both of these warnings are false-positives that arise due to
limitations in the is-initialized theorem prover logic of GCC 4.8.
So, in other words, it is not possible for either pLeft or eOp2 to be
used uninitialized - it is just that GCC 4.8 is unable to construct a
proof of that fact.  If you are unwilling to work-around this problem
by omitting -Werror, then you might try upgrading to GCC 5.4.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to