request for comments: the -Wconversion warnings.

Harrie Hazewinkel <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <6954799.1028146840@localhost>
HI,

The warnings generated by -Wconversion are enormous in amount.
I have started to fix some (not even 25%) and one can look
in the attached file.

What do others think of this??


Harrie

Internet Management Consulting
mailto:[email protected]                http ://www.mod-snmp.com/
-------------------------------------------------------------------
Author of MOD-SNMP, enabling SNMP management to the Apache server.
sus.patch (application/octet-stream, 29.8 KB)
'pheasant' for login: exec 'cvs diff'
Index: configure
===================================================================
RCS file: /home/cvs/gateway/configure,v
retrieving revision 1.99
diff -u -r1.99 configure
--- configure	9 Jul 2002 08:36:14 -0000	1.99
+++ configure	31 Jul 2002 18:14:01 -0000
@@ -2477,7 +2477,15 @@
   
   echo enabling compilation warnings
   if test -n "$GCC"; then
-    CFLAGS="$CFLAGS -Wall -O2 -g"
+    CFLAGS="$CFLAGS -Wall"
+    #CFLAGS="$CFLAGS -Wshadow"
+    CFLAGS="$CFLAGS -Wstrict-prototypes"
+    CFLAGS="$CFLAGS -Wmissing-prototypes"
+    CFLAGS="$CFLAGS -Wmissing-declarations"
+    CFLAGS="$CFLAGS -Wconversion"
+    CFLAGS="$CFLAGS -Wnested-externs"
+    CFLAGS="$CFLAGS -Winline"
+    CFLAGS="$CFLAGS -Wredundant-decls"
   fi
 
 fi
@@ -2571,7 +2579,7 @@
 
 if test "x$SUFFIX" != "x" ; then
   echo $ac_n "checking whether to append suffix to binary""... $ac_c" 1>&6
-echo "configure:2575: checking whether to append suffix to binary" >&5
+echo "configure:2583: checking whether to append suffix to binary" >&5
   echo "$ac_t""$SUFFIX" 1>&6
 fi
 
@@ -2610,7 +2618,7 @@
 
 
 echo $ac_n "checking which malloc to use""... $ac_c" 1>&6
-echo "configure:2614: checking which malloc to use" >&5
+echo "configure:2622: checking which malloc to use" >&5
 # Check whether --with-malloc or --without-malloc was given.
 if test "${with_malloc+set}" = set; then
   withval="$with_malloc"
@@ -2701,7 +2709,7 @@
     if test "$enableval" = "yes"
     then
 	echo $ac_n "checking for pam_end in -lpam""... $ac_c" 1>&6
-echo "configure:2705: checking for pam_end in -lpam" >&5
+echo "configure:2713: checking for pam_end in -lpam" >&5
 ac_lib_var=`echo pam'_'pam_end | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2709,7 +2717,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lpam  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2713 "configure"
+#line 2721 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2720,7 +2728,7 @@
 pam_end()
 ; return 0; }
 EOF
-if { (eval echo configure:2724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2748,7 +2756,7 @@
 fi
 
 	echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
-echo "configure:2752: checking for main in -ldl" >&5
+echo "configure:2760: checking for main in -ldl" >&5
 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2756,14 +2764,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2760 "configure"
+#line 2768 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2794,17 +2802,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2798: checking for $ac_hdr" >&5
+echo "configure:2806: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2803 "configure"
+#line 2811 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2954,7 +2962,7 @@
 
 
 echo $ac_n "checking whether to compile with SSL support""... $ac_c" 1>&6
-echo "configure:2958: checking whether to compile with SSL support" >&5
+echo "configure:2966: checking whether to compile with SSL support" >&5
 # Check whether --enable-ssl or --disable-ssl was given.
 if test "${enable_ssl+set}" = set; then
   enableval="$enable_ssl"
@@ -2999,7 +3007,7 @@
   # Extract the first word of "openssl", so it can be a program name with args.
 set dummy openssl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3003: checking for $ac_word" >&5
+echo "configure:3011: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_OPENSSL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3034,12 +3042,12 @@
 
   if test "$OPENSSL" = "yes"; then
     echo $ac_n "checking openssl version""... $ac_c" 1>&6
-echo "configure:3038: checking openssl version" >&5
+echo "configure:3046: checking openssl version" >&5
     openssl_version=`$OPENSSL version | awk '{print $2}'`
     echo "$ac_t""$openssl_version" 1>&6
   fi
   echo $ac_n "checking for CRYPTO_lock in -lcrypto""... $ac_c" 1>&6
-echo "configure:3043: checking for CRYPTO_lock in -lcrypto" >&5
+echo "configure:3051: checking for CRYPTO_lock in -lcrypto" >&5
 ac_lib_var=`echo crypto'_'CRYPTO_lock | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3047,7 +3055,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypto  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3051 "configure"
+#line 3059 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3058,7 +3066,7 @@
 CRYPTO_lock()
 ; return 0; }
 EOF
-if { (eval echo configure:3062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3075,7 +3083,7 @@
   echo "$ac_t""yes" 1>&6
    LIBS="$LIBS -lcrypto"
     echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
-echo "configure:3079: checking for SSL_library_init in -lssl" >&5
+echo "configure:3087: checking for SSL_library_init in -lssl" >&5
 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3083,7 +3091,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lssl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3087 "configure"
+#line 3095 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3094,7 +3102,7 @@
 SSL_library_init()
 ; return 0; }
 EOF
-if { (eval echo configure:3098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3110,7 +3118,7 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
    echo $ac_n "checking for SSL_connect in -lssl""... $ac_c" 1>&6
-echo "configure:3114: checking for SSL_connect in -lssl" >&5
+echo "configure:3122: checking for SSL_connect in -lssl" >&5
 ac_lib_var=`echo ssl'_'SSL_connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3118,7 +3126,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lssl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3122 "configure"
+#line 3130 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3129,7 +3137,7 @@
 SSL_connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3161,17 +3169,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3165: checking for $ac_hdr" >&5
+echo "configure:3173: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3170 "configure"
+#line 3178 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3198,13 +3206,13 @@
 done
 
       echo $ac_n "checking whether the OpenSSL library is multithread-enabled""... $ac_c" 1>&6
-echo "configure:3202: checking whether the OpenSSL library is multithread-enabled" >&5
+echo "configure:3210: checking whether the OpenSSL library is multithread-enabled" >&5
       if test "$cross_compiling" = yes; then
   echo "Cross-compiling; make sure your SSL library is multithread-enabled"
       
 else
   cat > conftest.$ac_ext <<EOF
-#line 3208 "configure"
+#line 3216 "configure"
 #include "confdefs.h"
  
         #define OPENSSL_THREAD_DEFINES
@@ -3218,7 +3226,7 @@
         }
       
 EOF
-if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
         echo "$ac_t""yes" 1>&6
@@ -3228,7 +3236,7 @@
 
         LIBS="$LIBS -lssl"
         echo $ac_n "checking whether to compile with SSL support""... $ac_c" 1>&6
-echo "configure:3232: checking whether to compile with SSL support" >&5
+echo "configure:3240: checking whether to compile with SSL support" >&5
 	echo "$ac_t""yes" 1>&6
       
 else
@@ -3289,7 +3297,7 @@
 
 
 echo $ac_n "checking whether to compile with MySQL support""... $ac_c" 1>&6
-echo "configure:3293: checking whether to compile with MySQL support" >&5
+echo "configure:3301: checking whether to compile with MySQL support" >&5
 # Check whether --enable-mysql or --disable-mysql was given.
 if test "${enable_mysql+set}" = set; then
   enableval="$enable_mysql"
@@ -3304,7 +3312,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3308: checking for $ac_word" >&5
+echo "configure:3316: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MYSQL_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3345,12 +3353,12 @@
       for loc in /usr /usr/local ; do 
         if test "x$found" = "x" ; then 
           echo $ac_n "checking for MySQL client support in""... $ac_c" 1>&6
-echo "configure:3349: checking for MySQL client support in" >&5
+echo "configure:3357: checking for MySQL client support in" >&5
           echo "$ac_t""$loc" 1>&6
           
 ac_safe=`echo ""$loc/include/mysql/mysql.h"" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for "$loc/include/mysql/mysql.h"""... $ac_c" 1>&6
-echo "configure:3354: checking for "$loc/include/mysql/mysql.h"" >&5
+echo "configure:3362: checking for "$loc/include/mysql/mysql.h"" >&5
 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3372,7 +3380,7 @@
 
 ac_safe=`echo ""$loc/include/mysql.h"" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for "$loc/include/mysql.h"""... $ac_c" 1>&6
-echo "configure:3376: checking for "$loc/include/mysql.h"" >&5
+echo "configure:3384: checking for "$loc/include/mysql.h"" >&5
 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3405,7 +3413,7 @@
       fi
     else
             echo $ac_n "checking mysql version""... $ac_c" 1>&6
-echo "configure:3409: checking mysql version" >&5
+echo "configure:3417: checking mysql version" >&5
       mysql_version=`$MYSQL_CONFIG --version`
       echo "$ac_t""$mysql_version" 1>&6
       LIBS="$LIBS `$MYSQL_CONFIG --libs`"
@@ -3416,7 +3424,7 @@
       
 ac_safe=`echo ""$mysqlloc/include/mysql/mysql.h"" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for "$mysqlloc/include/mysql/mysql.h"""... $ac_c" 1>&6
-echo "configure:3420: checking for "$mysqlloc/include/mysql/mysql.h"" >&5
+echo "configure:3428: checking for "$mysqlloc/include/mysql/mysql.h"" >&5
 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3438,7 +3446,7 @@
 
 ac_safe=`echo ""$mysqlloc/include/mysql.h"" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for "$mysqlloc/include/mysql.h"""... $ac_c" 1>&6
-echo "configure:3442: checking for "$mysqlloc/include/mysql.h"" >&5
+echo "configure:3450: checking for "$mysqlloc/include/mysql.h"" >&5
 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3469,17 +3477,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3473: checking for $ac_hdr" >&5
+echo "configure:3481: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3478 "configure"
+#line 3486 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3506,7 +3514,7 @@
 done
 
   echo $ac_n "checking for mysql_init in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:3510: checking for mysql_init in -lmysqlclient" >&5
+echo "configure:3518: checking for mysql_init in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3514,7 +3522,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3518 "configure"
+#line 3526 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3525,7 +3533,7 @@
 mysql_init()
 ; return 0; }
 EOF
-if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3557,7 +3565,7 @@
 EOF
 
   echo $ac_n "checking whether to compile with MySQL support""... $ac_c" 1>&6
-echo "configure:3561: checking whether to compile with MySQL support" >&5
+echo "configure:3569: checking whether to compile with MySQL support" >&5
   echo "$ac_t""yes" 1>&6
   MYSQL="yes"
   fi
@@ -3580,7 +3588,7 @@
   echo "${nl}${T_MD}Configuring DLR support ...${T_ME}"
  
   echo $ac_n "checking for DLR storage type""... $ac_c" 1>&6
-echo "configure:3584: checking for DLR storage type" >&5
+echo "configure:3592: checking for DLR storage type" >&5
   echo "$ac_t""$withval" 1>&6
   case "$withval" in
   internal)
@@ -3615,14 +3623,14 @@
   echo "${nl}${T_MD}Configuring WTLS support ...${T_ME}"
  
   echo $ac_n "checking for WTLS library""... $ac_c" 1>&6
-echo "configure:3619: checking for WTLS library" >&5
+echo "configure:3627: checking for WTLS library" >&5
   echo "$ac_t""$withval" 1>&6
   case "$withval" in
   openssl) 
  	OLDLIBS="$LIBS"
 	LIBS="$LIBS -L/usr/local/ssl/lib -lcrypto"
     echo $ac_n "checking for RSA_new in -lcrypto""... $ac_c" 1>&6
-echo "configure:3626: checking for RSA_new in -lcrypto" >&5
+echo "configure:3634: checking for RSA_new in -lcrypto" >&5
 ac_lib_var=`echo crypto'_'RSA_new | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3630,7 +3638,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypto  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3634 "configure"
+#line 3642 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3641,7 +3649,7 @@
 RSA_new()
 ; return 0; }
 EOF
-if { (eval echo configure:3645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3660,17 +3668,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3664: checking for $ac_hdr" >&5
+echo "configure:3672: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3669 "configure"
+#line 3677 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
Index: configure.in
===================================================================
RCS file: /home/cvs/gateway/configure.in,v
retrieving revision 1.101
diff -u -r1.101 configure.in
--- configure.in	9 Jul 2002 08:36:14 -0000	1.101
+++ configure.in	31 Jul 2002 18:14:02 -0000
@@ -236,7 +236,15 @@
 [  --enable-warnings    enable compilation warnings (default: disabled)], [
   echo enabling compilation warnings
   if test -n "$GCC"; then
-    CFLAGS="$CFLAGS -Wall -O2 -g"
+    CFLAGS="$CFLAGS -Wall"
+    #CFLAGS="$CFLAGS -Wshadow"
+    CFLAGS="$CFLAGS -Wstrict-prototypes"
+    CFLAGS="$CFLAGS -Wmissing-prototypes"
+    CFLAGS="$CFLAGS -Wmissing-declarations"
+    CFLAGS="$CFLAGS -Wconversion"
+    CFLAGS="$CFLAGS -Wnested-externs"
+    CFLAGS="$CFLAGS -Winline"
+    CFLAGS="$CFLAGS -Wredundant-decls"
   fi
 ])
 
Index: gw/bb_store.c
===================================================================
RCS file: /home/cvs/gateway/gw/bb_store.c,v
retrieving revision 1.11
diff -u -r1.11 bb_store.c
--- gw/bb_store.c	17 Jan 2002 07:52:39 -0000	1.11
+++ gw/bb_store.c	31 Jul 2002 18:14:03 -0000
@@ -286,7 +286,7 @@
 	}
     }
 
-    info(0, "Store-file size %ld, starting to unpack%s", octstr_len(store_file),
+    info(0, "Store-file size %ld, starting to unpack%s", (long)octstr_len(store_file),
 	 octstr_len(store_file) > 10000 ? " (may take awhile)" : "");
 
     msg_hash = dict_create(101, NULL);  /* XXX should be different? */
Index: gw/ota_prov.c
===================================================================
RCS file: /home/cvs/gateway/gw/ota_prov.c,v
retrieving revision 1.5
diff -u -r1.5 ota_prov.c
--- gw/ota_prov.c	24 May 2002 16:11:08 -0000	1.5
+++ gw/ota_prov.c	31 Jul 2002 18:14:04 -0000
@@ -16,6 +16,7 @@
 
 #include "msg.h"
 #include "sms.h"
+#include "ota_prov.h"
 #include "ota_prov_attr.h"
 #include "ota_compiler.h"
 
Index: gw/ota_prov.h
===================================================================
RCS file: /home/cvs/gateway/gw/ota_prov.h,v
retrieving revision 1.2
diff -u -r1.2 ota_prov.h
--- gw/ota_prov.h	27 Jan 2002 11:59:47 -0000	1.2
+++ gw/ota_prov.h	31 Jul 2002 18:14:04 -0000
@@ -38,4 +38,5 @@
 Msg *ota_tokenize_bookmarks(CfgGroup *grp, Octstr *from, Octstr *receiver);
 
 
+
 #endif /* OTA_PROV_H */
Index: gwlib/cfg.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/cfg.c,v
retrieving revision 1.18
diff -u -r1.18 cfg.c
--- gwlib/cfg.c	30 May 2002 22:06:49 -0000	1.18
+++ gwlib/cfg.c	31 Jul 2002 18:14:05 -0000
@@ -49,7 +49,7 @@
 }; 
 
 
-CfgLoc *cfgloc_create(Octstr *filename) 
+static CfgLoc *cfgloc_create(Octstr *filename) 
 { 
     CfgLoc *cfgloc; 
      
@@ -61,7 +61,7 @@
 } 
  
  
-void cfgloc_destroy(CfgLoc *cfgloc) 
+static void cfgloc_destroy(CfgLoc *cfgloc) 
 { 
     if (cfgloc != NULL) { 
 	octstr_destroy(cfgloc->filename); 
Index: gwlib/octstr.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/octstr.c,v
retrieving revision 1.134
diff -u -r1.134 octstr.c
--- gwlib/octstr.c	26 Apr 2002 10:40:02 -0000	1.134
+++ gwlib/octstr.c	31 Jul 2002 18:14:07 -0000
@@ -60,8 +60,8 @@
 struct Octstr
 {
     unsigned char *data;
-    long len;
-    long size;
+    size_t len;
+    size_t size;
     int immutable;
 };
 
@@ -109,7 +109,7 @@
 
 
 /* Reserve space for at least 'size' octets */
-static void octstr_grow(Octstr *ostr, long size)
+static void octstr_grow(Octstr *ostr, size_t size)
 {
     gw_assert(!ostr->immutable);
     seems_valid(ostr);
@@ -174,7 +174,7 @@
 }
 
 
-Octstr *octstr_create_from_data_real(const char *data, long len)
+Octstr *octstr_create_from_data_real(const char *data, size_t len)
 {
     Octstr *ostr;
 
@@ -259,7 +259,7 @@
 }
 
 
-long octstr_len(Octstr *ostr)
+size_t octstr_len(Octstr *ostr)
 {
     if (ostr == NULL)
         return 0;
@@ -268,7 +268,7 @@
 }
 
 
-Octstr *octstr_copy_real(Octstr *ostr, long from, long len)
+Octstr *octstr_copy_real(Octstr *ostr, unsigned long from, size_t len)
 {
     seems_valid(ostr);
     gw_assert(from >= 0);
@@ -318,7 +318,7 @@
 }
 
 
-int octstr_get_char(Octstr *ostr, long pos)
+int octstr_get_char(Octstr *ostr, unsigned long pos)
 {
     seems_valid(ostr);
     if (pos >= ostr->len || pos < 0)
@@ -327,7 +327,7 @@
 }
 
 
-void octstr_set_char(Octstr *ostr, long pos, int ch)
+void octstr_set_char(Octstr *ostr, unsigned long pos, int ch)
 {
     seems_valid(ostr);
     gw_assert(!ostr->immutable);
@@ -337,7 +337,7 @@
 }
 
 
-void octstr_get_many_chars(char *buf, Octstr *ostr, long pos, long len)
+void octstr_get_many_chars(char *buf, Octstr *ostr, unsigned long pos, size_t len)
 {
     gw_assert(buf != NULL);
     seems_valid(ostr);
@@ -658,7 +658,7 @@
 }
 
 
-long octstr_parse_long(long *nump, Octstr *ostr, long pos, int base)
+long octstr_parse_long(long *nump, Octstr *ostr, unsigned long pos, int base)
 {
     /* strtol wants a char *, and we have to compare the result to
      * an unsigned char *.  The easiest way to avoid warnings without
@@ -691,7 +691,7 @@
 }
 
 
-int octstr_check_range(Octstr *ostr, long pos, long len,
+int octstr_check_range(Octstr *ostr, unsigned long pos, size_t len,
                        octstr_func_t filter)
 {
     long end = pos + len;
@@ -713,7 +713,7 @@
 }
 
 
-void octstr_convert_range(Octstr *ostr, long pos, long len,
+void octstr_convert_range(Octstr *ostr, unsigned long pos, size_t len,
                           octstr_func_t map)
 {
     long end = pos + len;
@@ -847,7 +847,7 @@
 }
 
 
-int octstr_search_char(Octstr *ostr, int ch, long pos)
+long octstr_search_char(Octstr *ostr, int ch, unsigned long pos)
 {
     unsigned char *p;
 
@@ -866,7 +866,7 @@
 }
 
 
-int octstr_search(Octstr *haystack, Octstr *needle, long pos)
+long octstr_search(Octstr *haystack, Octstr *needle, unsigned long pos)
 {
     int first;
 
@@ -1190,7 +1190,7 @@
 }
 
 
-void octstr_insert_data(Octstr *ostr, long pos, const char *data, long len)
+void octstr_insert_data(Octstr *ostr, unsigned long pos, const char *data, size_t len)
 {
     seems_valid(ostr);
     gw_assert(!ostr->immutable);
@@ -1211,7 +1211,7 @@
 }
 
 
-void octstr_append_data(Octstr *ostr, const char *data, long len)
+void octstr_append_data(Octstr *ostr, const char *data, size_t len)
 {
     gw_assert(ostr != NULL);
     octstr_insert_data(ostr, ostr->len, data, len);
@@ -1241,7 +1241,7 @@
 }
 
 
-void octstr_delete(Octstr *ostr1, long pos, long len)
+void octstr_delete(Octstr *ostr1, unsigned long pos, size_t len)
 {
     seems_valid(ostr1);
     gw_assert(!ostr1->immutable);
@@ -1711,7 +1711,7 @@
 }
 
 
-void octstr_append_uintvar(Octstr *ostr, unsigned long value)
+void octstr_append_uintvar(Octstr *ostr, unsigned int value)
 {
     /* A uintvar is defined to be up to 32 bits large, so it will
      * fit in 5 octets. */
@@ -1734,7 +1734,7 @@
 }
 
 
-long octstr_extract_uintvar(Octstr *ostr, unsigned long *value, long pos)
+long octstr_extract_uintvar(Octstr *ostr, unsigned long *value, unsigned long pos)
 {
     int c;
     int count;
@@ -1877,7 +1877,7 @@
 {
     Octstr *new;
     char *s, *pad;
-    long n;
+    unsigned long n;
     unsigned long u;
     char tmpfmt[1024];
     char tmpbuf[1024];
Index: gwlib/octstr.h
===================================================================
RCS file: /home/cvs/gateway/gwlib/octstr.h,v
retrieving revision 1.68
diff -u -r1.68 octstr.h
--- gwlib/octstr.h	26 Apr 2002 10:40:24 -0000	1.68
+++ gwlib/octstr.h	31 Jul 2002 18:14:08 -0000
@@ -72,7 +72,7 @@
  * Create an octet string from arbitrary binary data. The length of the
  * data is given, so it can contain NUL characters.
  */
-Octstr *octstr_create_from_data_real(const char *data, long len);
+Octstr *octstr_create_from_data_real(const char *data, size_t len);
 #define octstr_create_from_data(data, len)\
     gw_claim_area(octstr_create_from_data_real((data), (len)))
 
@@ -104,7 +104,7 @@
 /*
  * Return the length of (number of octets in) an object string.
  */
-long octstr_len(Octstr *ostr);
+size_t octstr_len(Octstr *ostr);
 
 
 /*
@@ -113,7 +113,7 @@
  * octet string is created. If `from+len' is after the end of `ostr', 
  * `len' is reduced appropriately.
  */
-Octstr *octstr_copy_real(Octstr *ostr, long from, long len);
+Octstr *octstr_copy_real(Octstr *ostr, unsigned long from, size_t len);
 #define octstr_copy(ostr, from, len) \
     gw_claim_area(octstr_copy_real((ostr), (from), (len)))
 
@@ -137,7 +137,7 @@
  * value has a range of 0..255 for valid positions, and -1 if `pos' is
  * after the end of the octet string.
  */
-int octstr_get_char(Octstr *ostr, long pos);
+int octstr_get_char(Octstr *ostr, unsigned long pos);
 
 
 /*
@@ -145,13 +145,13 @@
  * fail: if pos is not inside the string, the operation will silently be
  * ignored.
  */
-void octstr_set_char(Octstr *ostr, long pos, int ch);
+void octstr_set_char(Octstr *ostr, unsigned long pos, int ch);
 
 
 /*
  * Copy bytes from octet string into array.
  */
-void octstr_get_many_chars(char *buf, Octstr *ostr, long pos, long len);
+void octstr_get_many_chars(char *buf, Octstr *ostr, unsigned long pos, size_t len);
 
 
 /*
@@ -218,7 +218,7 @@
  *    ERANGE    The number did not fit in a long.
  *    EINVAL    No digits of the appropriate base were found.
  */
-long octstr_parse_long(long *number, Octstr *ostr, long pos, int base);
+long octstr_parse_long(long *number, Octstr *ostr, unsigned long pos, int base);
 
 
 /* Run the 'filter' function over each character in the specified range.
@@ -227,7 +227,7 @@
  * For example: ok = octstr_check_range(o, 1, 10, gw_isdigit);
  */
 typedef int (*octstr_func_t)(int);
-int octstr_check_range(Octstr *ostr, long pos, long len, 
+int octstr_check_range(Octstr *ostr, unsigned long pos, size_t len, 
     	    	       octstr_func_t filter);
 
 
@@ -235,7 +235,7 @@
  * replacing each character with the return value of that function.
  * For example: octstr_convert_range(o, 1, 10, tolower);
  */
-void octstr_convert_range(Octstr *ostr, long pos, long len, 
+void octstr_convert_range(Octstr *ostr, unsigned long pos, size_t len, 
     	    	    	  octstr_func_t map);
 
 
@@ -278,7 +278,7 @@
  * Search the character from octet string starting from position pos. Returns 
  * the position (index) of the char in string, -1 if not found.
  */
-int octstr_search_char(Octstr *ostr, int ch, long pos);
+long octstr_search_char(Octstr *ostr, int ch, unsigned long pos);
 
 
 /*
@@ -286,13 +286,13 @@
  * Return the start position (index) of 'needle' in 'haystack'.
  * Return -1 if not found.
  */
-int octstr_search(Octstr *haystack, Octstr *needle, long pos);
+long octstr_search(Octstr *haystack, Octstr *needle, unsigned long pos);
 
 
 /*
  * Like octstr_search, but ignores 8-bit byte case.
  */
-int octstr_case_search(Octstr *haystack, Octstr *needle, long pos);
+int octstr_case_search(Octstr *haystack, Octstr *needle, unsigned long pos);
 
 
 /*
@@ -328,7 +328,7 @@
  * Insert one octet string into another. `pos' gives the position
  * in `ostr1' where `ostr2' should be inserted.
  */
-void octstr_insert(Octstr *ostr1, Octstr *ostr2, long pos);
+void octstr_insert(Octstr *ostr1, Octstr *ostr2, unsigned long pos);
 
 
 /*
@@ -338,13 +338,13 @@
  * If the given `pos' is greater than the length of the input octet string,
  * it is set to that length, resulting in an append.
  */
-void octstr_insert_data(Octstr *ostr, long pos, const char *data, long len);
+void octstr_insert_data(Octstr *ostr, unsigned long pos, const char *data, size_t len);
 
 
 /*
  * Append characters from C array at the tail of an octet string.
  */
-void octstr_append_data(Octstr *ostr, const char *data, long len);
+void octstr_append_data(Octstr *ostr, const char *data, size_t len);
 
 
 /*
@@ -397,7 +397,7 @@
 /*
  * Delete part of an octet string.
  */
-void octstr_delete(Octstr *ostr1, long pos, long len);
+void octstr_delete(Octstr *ostr1, long pos, size_t len);
 
 
 /*
@@ -479,7 +479,7 @@
 /* 
  * Encode value in WSP's uintvar format, and append it to the octstr
  */
-void octstr_append_uintvar(Octstr *ostr, unsigned long value);
+void octstr_append_uintvar(Octstr *ostr, unsigned int value);
 
 
 /*
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.