Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/tool/warnings.sh # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / tool / warnings.sh` 76 lines ยท 2289 bytes Raw Blame History 1 #/bin/sh 2 # 3 # Run this script in a directory with a working makefile to check for 4 # compiler warnings in SQLite. 5 # 6 7 if uname | grep -i openbsd ; then 8 # Use these for testing on OpenBSD: 9 WARNING_OPTS=-Wall 10 WARNING_ANDROID_OPTS=-Wall 11 else 12 # Use these for testing on Linux and Mac OSX: 13 WARNING_OPTS="-Wshadow -Wall -Wextra -pedantic" 14 gccvers=`gcc -v 2>&1 | grep '^gcc version'` 15 if test "$gccvers" '<' 'gcc version 6' 16 then 17 WARNING_ANDROID_OPTS="-Wshadow -Wall -Wextra" 18 else 19 WARNING_ANDROID_OPTS="-Wshadow -Wall -Wextra -Wimplicit-fallthrough=0" 20 fi 21 fi 22 23 rm -f sqlite3.c 24 make sqlite3.c 25 echo '**** No optimizations. Includes FTS4/5, GEOPOLY, and others ***' 26 echo '****' $WARNING_OPTS 27 gcc -c $WARNING_OPTS -std=c99 \ 28 -DHAVE_STDINT_H \ 29 -DSQLITE_ENABLE_FTS4 \ 30 -DSQLITE_ENABLE_FTS5 \ 31 -DSQLITE_ENABLE_GEOPOLY \ 32 -DSQLITE_ENABLE_DBSTAT_VTAB \ 33 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ 34 -DSQLITE_ENABLE_MATH_FUNCTIONS_fixme \ 35 -DSQLITE_ENABLE_STMTVTAB \ 36 -DSQLITE_ENABLE_DBPAGE_VTAB \ 37 sqlite3.c 38 if test x`uname` = 'xLinux'; then 39 echo '**** Android configuration ******************************' 40 echo '****' $WARNING_ANDROID_OPTS 41 gcc -c \ 42 -DSQLITE_HAVE_ISNAN \ 43 -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=`1048576` \ 44 -DSQLITE_THREADSAFE=2 \ 45 -DSQLITE_TEMP_STORE=3 \ 46 -DSQLITE_POWERSAFE_OVERWRITE=1 \ 47 -DSQLITE_DEFAULT_FILE_FORMAT=4 \ 48 -DSQLITE_DEFAULT_AUTOVACUUM=1 \ 49 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 \ 50 -DSQLITE_ENABLE_FTS3 \ 51 -DSQLITE_ENABLE_FTS3_BACKWARDS \ 52 -DSQLITE_ENABLE_FTS4 \ 53 -DSQLITE_OMIT_BUILTIN_TEST \ 54 -DSQLITE_OMIT_COMPILEOPTION_DIAGS \ 55 -DSQLITE_OMIT_LOAD_EXTENSION \ 56 -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 \ 57 -DSQLITE_ENABLE_ICU \ 58 -DUSE_PREAD64 \ 59 $WARNING_ANDROID_OPTS \ 60 -Os sqlite3.c shell.c 61 fi 62 echo '**** No optimizations. ENABLE_STAT4. THREADSAFE=0 *******' 63 echo '****' $WARNING_OPTS 64 gcc -c $WARNING_OPTS -std=c99 \ 65 -DSQLITE_ENABLE_STAT4 \ 66 -DSQLITE_THREADSAFE=0 \ 67 sqlite3.c 68 echo '**** Optimized -O3. Includes FTS4/5, GEOPOLY, JSON1 ******' 69 echo '****' $WARNING_OPTS 70 gcc -O3 -c $WARNING_OPTS -std=c99 \ 71 -Wdeclaration-after-statement \ 72 -DHAVE_STDINT_H \ 73 -DSQLITE_ENABLE_FTS4 \ 74 -DSQLITE_ENABLE_FTS5 \ 75 -DSQLITE_ENABLE_GEOPOLY \ 76 sqlite3.c