Fix harmless static-analysis warnings, mosting having to do with memory
leaks in the command-line shell.  Add a clang analysis of the command-line
shell to the "warnings-clang.sh" script.  Other minor cleanups to the
command-line shell code.

FossilOrigin-Name: 93a0f452a7023898ad3d62ee81b39a80477c332f
diff --git a/tool/build-shell.sh b/tool/build-shell.sh
index 54e8308..8e62a71 100644
--- a/tool/build-shell.sh
+++ b/tool/build-shell.sh
@@ -12,8 +12,8 @@
 gcc -o sqlite3 -g -Os -I. \
    -DSQLITE_THREADSAFE=0 \
    -DSQLITE_ENABLE_VFSTRACE \
-   -DSQLITE_ENABLE_STAT2 \
-   -DSQLITE_ENABLE_FTS3 \
+   -DSQLITE_ENABLE_STAT3 \
+   -DSQLITE_ENABLE_FTS4 \
    -DSQLITE_ENABLE_RTREE \
    -DHAVE_READLINE \
    -DHAVE_USLEEP=1 \
diff --git a/tool/warnings-clang.sh b/tool/warnings-clang.sh
index 51084f3..b0d2fb6 100644
--- a/tool/warnings-clang.sh
+++ b/tool/warnings-clang.sh
@@ -9,5 +9,6 @@
 scan-build gcc -c -DHAVE_STDINT_H -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE \
       -DSQLITE_DEBUG sqlite3.c 2>&1 | grep -v 'ANALYZE:'
 echo '********** ENABLE_STAT3. THREADSAFE=0 *******'
-scan-build gcc -c -DSQLITE_ENABLE_STAT3 -DSQLITE_THREADSAFE=0 \
-      -DSQLITE_DEBUG sqlite3.c 2>&1 | grep -v 'ANALYZE:'
+scan-build gcc -c -I. -DSQLITE_ENABLE_STAT3 -DSQLITE_THREADSAFE=0 \
+      -DSQLITE_DEBUG \
+      sqlite3.c ../sqlite/src/shell.c -ldl 2>&1 | grep -v 'ANALYZE:'