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".

Environment:
OS: CentOS 7
gcc: 4.8.5 20150623 (Red Hat 4.8.5-16)
sqlite: 3.21.0 (SQLITE_SOURCE_ID = "2017-10-24 18:55:49 
1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de48827")

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

Reply via email to