summaryrefslogtreecommitdiff
path: root/tool/warnings.sh
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2012-03-30 20:42:12 -0400
committerHans-Christoph Steiner <hans@eds.org>2012-03-30 20:42:12 -0400
commit7bb481fda9ecb134804b49c2ce77ca28f7eea583 (patch)
tree31b520b9914d3e2453968abe375f2c102772c3dc /tool/warnings.sh
Imported Upstream version 2.0.3
Diffstat (limited to 'tool/warnings.sh')
-rw-r--r--tool/warnings.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/tool/warnings.sh b/tool/warnings.sh
new file mode 100644
index 0000000..78cfb55
--- /dev/null
+++ b/tool/warnings.sh
@@ -0,0 +1,19 @@
+#/bin/sh
+#
+# Run this script in a directory with a working makefile to check for
+# compiler warnings in SQLite.
+#
+rm -f sqlite3.c
+make sqlite3.c-debug
+echo '********** No optimizations. Includes FTS4 and RTREE *********'
+gcc -c -Wshadow -Wall -Wextra -pedantic-errors -Wno-long-long -std=c89 \
+ -ansi -DHAVE_STDINT_H -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE \
+ sqlite3.c
+echo '********** No optimizations. ENABLE_STAT3. THREADSAFE=0 *******'
+gcc -c -Wshadow -Wall -Wextra -pedantic-errors -Wno-long-long -std=c89 \
+ -ansi -DSQLITE_ENABLE_STAT3 -DSQLITE_THREADSAFE=0 \
+ sqlite3.c
+echo '********** Optimized -O3. Includes FTS4 and RTREE ************'
+gcc -O3 -c -Wshadow -Wall -Wextra -pedantic-errors -Wno-long-long -std=c89 \
+ -ansi -DHAVE_STDINT_H -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE \
+ sqlite3.c