diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2013-12-24 18:03:06 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2013-12-24 18:03:06 +0000 |
commit | 52788c0f63139de170cfe1b3769fa1d5a97d9147 (patch) | |
tree | fb83f2ecdfc686ded390ea2a62dc21f582d7e106 /maint | |
parent | 91b4ccd50a4f6e8427d5eef3f7aadf854776eef0 (diff) | |
download | pcre-52788c0f63139de170cfe1b3769fa1d5a97d9147.tar.gz |
Get rid of some unitialized variable compiler warnings.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1417 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'maint')
-rwxr-xr-x | maint/ManyConfigTests | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/maint/ManyConfigTests b/maint/ManyConfigTests index 18476d0..b08495c 100755 --- a/maint/ManyConfigTests +++ b/maint/ManyConfigTests @@ -23,16 +23,20 @@ if [ "$1" = "-v" ] ; then verbose=1; fi tmp=/tmp/pcretesting -# Don't bother with compiler optimization; it just slows down compilation a lot -# (and running the tests themselves is quick). +# Don't bother with compiler optimization for most tests; it just slows down +# compilation a lot (and running the tests themselves is quick). However, a +# few specific tests turn optimization on, because it can provoke some compiler +# warnings. CFLAGS="-g -O0" CXXFLAGS="$CFLAGS" +ISGCC="no" # If the compiler is gcc, add a lot of warning switches. cc --version >zzz 2>/dev/null if [ $? -eq 0 ] && grep GCC zzz >/dev/null; then + ISGCC="yes" CFLAGS="$CFLAGS -Wall" CFLAGS="$CFLAGS -Wno-overlength-strings" CFLAGS="$CFLAGS -Wpointer-arith" @@ -159,25 +163,38 @@ function runtest() } +# Update the total count whenever a new test is added; it is used to show +# progess as each test is run. + +testtotal=42 +testcount=0 + # This set of tests builds PCRE and runs the tests with a variety of configure -# options, in the current (source) directory. The first (empty) configuration -# builds with all the default settings. As well as testing that these options -# work, we use --disable-shared or --disable-static after the first test (which -# builds both) to save a bit of time by building only one version of the -# library for the subsequent tests. +# options, in the current (source) directory. The empty configuration builds +# with all the default settings. As well as testing that these options work, we +# use --disable-shared or --disable-static after the default test (which builds +# both) to save a bit of time by building only one version of the library for +# the subsequent tests. valgrind= cvalgrind= withvalgrind= +srcdir=. +export srcdir -# Update the total count whenever a new test is added; it is used to show -# progess as each test is run. +# If gcc is in use, run a maximally configured test with -O2, because that can +# throw up warnings that are not detected with -O0. -testtotal=41 -testcount=0 +if [ "$ISGCC" = "yes" ]; then + echo "Maximally configured test with -O2" + SAVECLFAGS="$CFLAGS" + CFLAGS="$CFLAGS -O2" + opts="--disable-shared --enable-unicode-properties --enable-jit --enable-pcre16 --enable-pcre32" + runtest + CFLAGS="$SAVECFLAGS" +fi -echo "Tests in the current directory" -srcdir=. +echo "General tests in the current directory" for opts in \ "" \ "--enable-utf8 --disable-static" \ |