On Tue, Aug 2, 2016 at 2:00 PM, Stephan Beal <sgb...@googlemail.com> wrote:
> > > On Tue, Aug 2, 2016 at 1:46 PM, Johan Kuuse <jo...@kuu.se> wrote: > >> Thanks, now it works for both clang and gcc, with the added flags to >> Makefile: >> >> TCCFLAGS = -DFOSSIL_DYNAMIC_BUILD=1 -I/usr/local/include *-std=c89 >> -Wall* -g -O2 -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H >> >> Is there any special reason for *not* using the -Wextra and -Werror >> flags, like this? >> >> TCCFLAGS = -DFOSSIL_DYNAMIC_BUILD=1 -I/usr/local/include *-std=c89 >> -Wall** -Wextra** -Werror* -g -O2 -DHAVE_AUTOCONFIG_H >> -D_HAVE_SQLITE_CONFIG_H >> > > As i rememeber it, sqlite3 won't compile with strict C89 mode because of > its use of (long long), which is C99 (but is apparently implemented in all > C compilers when not running in strict C89 mode). > > Yes, you are right, it is because of the usage of (long long). The <openssl/sha.h>,included by sha.c, also uses (long long), so even if looking for a workaround for this in sqlite3.h, the (long long) warning will still be there. What about this? TCCFLAGS = -DFOSSIL_DYNAMIC_BUILD=1 -I/usr/local/include *-std=c89 -Wall** -Wextra** -Werror **-Wno-long-long* -g -O2 -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H At the moment, adding -Wextra -Wno-long-long, I get 320 warnings all in all, but only 3 different types of warnings: -Wmissing-field-initializers -Wsign-compare -Wunused-parameter Maybe I am too pedantic, but I would suggest adding the -Wextra flag anyway, to trap a lot of other existing warnings, and more important, future warnings. BR, Johan > > -- > ----- stephan beal > http://wanderinghorse.net/home/stephan/ > "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of > those who insist on a perfect world, freedom will have to do." -- Bigby Wolf > > _______________________________________________ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > >
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users