[PATCH] warnings1
Harrie Hazewinkel <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <6108972.1028132743@localhost> |
Hi, In the attached patch I have added various warnings to the '--enable-warning' option and have chnaged the code where need to silence the compiler. Some functions are now static, since I only found them used within the file itself. Some function were not even used at all anywhere. Therefore, I suggest you test it with your own enterprise extension. If I don't hear anything tomorrow I commit it. The warnings 'Wshadow' and 'Wconversion are not part of it yet. Harrie Internet Management Consulting mailto:[email protected] http ://www.mod-snmp.com/ ------------------------------------------------------------------- Author of MOD-SNMP, enabling SNMP management to the Apache server.
warnings1.patch
(application/octet-stream, 30.6 KB)
'pheasant' for login: exec 'cvs diff' Index: ChangeLog =================================================================== RCS file: /home/cvs/gateway/ChangeLog,v retrieving revision 1.1878 diff -u -r1.1878 ChangeLog --- ChangeLog 29 Jul 2002 12:39:55 -0000 1.1878 +++ ChangeLog 31 Jul 2002 14:18:38 -0000 @@ -1,3 +1,12 @@ +2002-07-31 Harrie Hazewinkel <[email protected]> + * Adding more warnings to the '--enable-warnings' and deleted the + duplicate '-g -O2' options when '--enable-warnings'. + Only the following warnings cannot be avoided, since these + depend on the lex/flex and yacc/bison plus the system. + - wmlscript/wsint.h:217: warning: function declaration isn't a prototype + - wmlscript/wslexer.c:166: warning: no previous prototype for `ws_yy_lex' + - wmlscript/wsint.h:237: warning: previous declaration of `ws_yy_parse' + 2002-07-29 Stipe Tolj <[email protected]> * test/fakewap.c: fixed compiler warnings from previous commit. 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 14:18:44 -0000 @@ -2477,7 +2477,13 @@ echo enabling compilation warnings if test -n "$GCC"; then - CFLAGS="$CFLAGS -Wall -O2 -g" + CFLAGS="$CFLAGS -Wall" + CFLAGS="$CFLAGS -Wstrict-prototypes" + CFLAGS="$CFLAGS -Wmissing-prototypes" + CFLAGS="$CFLAGS -Wmissing-declarations" + CFLAGS="$CFLAGS -Wnested-externs" + CFLAGS="$CFLAGS -Winline" + CFLAGS="$CFLAGS -Wredundant-decls" fi fi @@ -2571,7 +2577,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:2581: checking whether to append suffix to binary" >&5 echo "$ac_t""$SUFFIX" 1>&6 fi @@ -2610,7 +2616,7 @@ echo $ac_n "checking which malloc to use""... $ac_c" 1>&6 -echo "configure:2614: checking which malloc to use" >&5 +echo "configure:2620: 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 +2707,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:2711: 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 +2715,7 @@ ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <<EOF -#line 2713 "configure" +#line 2719 "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 +2726,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:2730: \"$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 +2754,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:2758: 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 +2762,14 @@ ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 2760 "configure" +#line 2766 "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:2773: \"$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 +2800,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:2804: 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 2809 "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:2814: \"$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 +2960,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:2964: 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 +3005,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:3009: 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 +3040,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:3044: 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:3049: 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 +3053,7 @@ ac_save_LIBS="$LIBS" LIBS="-lcrypto $LIBS" cat > conftest.$ac_ext <<EOF -#line 3051 "configure" +#line 3057 "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 +3064,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:3068: \"$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 +3081,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:3085: 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 +3089,7 @@ ac_save_LIBS="$LIBS" LIBS="-lssl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3087 "configure" +#line 3093 "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 +3100,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:3104: \"$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 +3116,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:3120: 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 +3124,7 @@ ac_save_LIBS="$LIBS" LIBS="-lssl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3122 "configure" +#line 3128 "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 +3135,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:3139: \"$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 +3167,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:3171: 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 3176 "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:3181: \"$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 +3204,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:3208: 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 3214 "configure" #include "confdefs.h" #define OPENSSL_THREAD_DEFINES @@ -3218,7 +3224,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:3228: \"$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 +3234,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:3238: checking whether to compile with SSL support" >&5 echo "$ac_t""yes" 1>&6 else @@ -3289,7 +3295,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:3299: 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 +3310,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:3314: 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 +3351,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:3355: 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:3360: 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 +3378,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:3382: 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 +3411,7 @@ fi else echo $ac_n "checking mysql version""... $ac_c" 1>&6 -echo "configure:3409: checking mysql version" >&5 +echo "configure:3415: checking mysql version" >&5 mysql_version=`$MYSQL_CONFIG --version` echo "$ac_t""$mysql_version" 1>&6 LIBS="$LIBS `$MYSQL_CONFIG --libs`" @@ -3416,7 +3422,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:3426: 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 +3444,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:3448: 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 +3475,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:3479: 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 3484 "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:3489: \"$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 +3512,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:3516: 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 +3520,7 @@ ac_save_LIBS="$LIBS" LIBS="-lmysqlclient $LIBS" cat > conftest.$ac_ext <<EOF -#line 3518 "configure" +#line 3524 "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 +3531,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:3535: \"$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 +3563,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:3567: checking whether to compile with MySQL support" >&5 echo "$ac_t""yes" 1>&6 MYSQL="yes" fi @@ -3580,7 +3586,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:3590: checking for DLR storage type" >&5 echo "$ac_t""$withval" 1>&6 case "$withval" in internal) @@ -3615,14 +3621,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:3625: 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:3632: 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 +3636,7 @@ ac_save_LIBS="$LIBS" LIBS="-lcrypto $LIBS" cat > conftest.$ac_ext <<EOF -#line 3634 "configure" +#line 3640 "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 +3647,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:3651: \"$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 +3666,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:3670: 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 3675 "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:3680: \"$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 14:18:45 -0000 @@ -236,7 +236,13 @@ [ --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 -Wstrict-prototypes" + CFLAGS="$CFLAGS -Wmissing-prototypes" + CFLAGS="$CFLAGS -Wmissing-declarations" + CFLAGS="$CFLAGS -Wnested-externs" + CFLAGS="$CFLAGS -Winline" + CFLAGS="$CFLAGS -Wredundant-decls" fi ]) Index: gw/dlr.c =================================================================== RCS file: /home/cvs/gateway/gw/dlr.c,v retrieving revision 1.20 diff -u -r1.20 dlr.c --- gw/dlr.c 9 Jul 2002 00:50:49 -0000 1.20 +++ gw/dlr.c 31 Jul 2002 14:18:46 -0000 @@ -49,8 +49,14 @@ * of his list is looked up once a delivery report comes in */ static List *dlr_waiting_list; -void dlr_destroy(dlr_wle *dlr); - +static void dlr_destroy(dlr_wle *dlr); +static void dlr_init_mem(void); +#ifdef DLR_MYSQL +static void dlr_init_mysql(Cfg* cfg); +#endif +static void dlr_shutdown_mem(void); +static void dlr_shutdown_mysql(void); +static dlr_wle *dlr_new(void); /* * At startup initialize the list, use abstraction to @@ -60,14 +66,14 @@ * processed. */ -void dlr_init_mem() +static void dlr_init_mem() { dlr_waiting_list = list_create(); } -void dlr_init_mysql(Cfg* cfg) -{ #ifdef DLR_MYSQL +static void dlr_init_mysql(Cfg* cfg) +{ CfgGroup *grp; List *grplist; Octstr *mysql_host, *mysql_user, *mysql_pass, *mysql_db, *mysql_id; @@ -156,8 +162,8 @@ octstr_destroy(mysql_user); octstr_destroy(mysql_pass); octstr_destroy(mysql_id); -#endif } +#endif /* DLR_MYSQL */ void dlr_init(Cfg* cfg) { @@ -212,12 +218,12 @@ * processed. */ -void dlr_shutdown_mem() +static void dlr_shutdown_mem() { list_destroy(dlr_waiting_list, (list_item_destructor_t *)dlr_destroy); } -void dlr_shutdown_mysql() +static void dlr_shutdown_mysql() { #ifdef DLR_MYSQL mysql_close(connection); @@ -252,7 +258,7 @@ * and intialize it to zero */ -dlr_wle *dlr_new() +static dlr_wle *dlr_new() { int i; dlr_wle *dlr; @@ -269,7 +275,7 @@ * internal function to destroy the dlr_wle entry */ -void dlr_destroy(dlr_wle *dlr) +static void dlr_destroy(dlr_wle *dlr) { O_DELETE (dlr->smsc); O_DELETE (dlr->timestamp); @@ -285,7 +291,7 @@ * external functions */ -void dlr_add_mem(char *smsc, char *ts, char *dst, char *service, char *url, int mask) +static void dlr_add_mem(char *smsc, char *ts, char *dst, char *service, char *url, int mask) { dlr_wle *dlr; @@ -303,7 +309,7 @@ } } -void dlr_add_mysql(char *smsc, char *ts, char *dst, char *service, char *url, int mask) +static void dlr_add_mysql(char *smsc, char *ts, char *dst, char *service, char *url, int mask) { #ifdef DLR_MYSQL Octstr *sql; @@ -346,7 +352,7 @@ } -Msg *dlr_find_mem(char *smsc, char *ts, char *dst, int typ) +static Msg *dlr_find_mem(char *smsc, char *ts, char *dst, int typ) { long i; long len; @@ -401,7 +407,7 @@ return NULL; } -Msg *dlr_find_mysql(char *smsc, char *ts, char *dst, int typ) +static Msg *dlr_find_mysql(char *smsc, char *ts, char *dst, int typ) { Msg *msg = NULL; #ifdef DLR_MYSQL Index: gw/dlr.h =================================================================== RCS file: /home/cvs/gateway/gw/dlr.h,v retrieving revision 1.8 diff -u -r1.8 dlr.h --- gw/dlr.h 24 May 2002 16:12:09 -0000 1.8 +++ gw/dlr.h 31 Jul 2002 14:18:46 -0000 @@ -39,7 +39,7 @@ void dlr_init(Cfg *cfg); /* DLR shutdown routine (abstracted) */ -void dlr_shutdown(); +void dlr_shutdown(void); /* * Add a new entry to the list 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 14:18:47 -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/smsc_at2.c =================================================================== RCS file: /home/cvs/gateway/gw/smsc_at2.c,v retrieving revision 1.45 diff -u -r1.45 smsc_at2.c --- gw/smsc_at2.c 13 May 2002 23:57:36 -0000 1.45 +++ gw/smsc_at2.c 31 Jul 2002 14:18:50 -0000 @@ -42,7 +42,7 @@ } -int at2_open_device1(PrivAT2data *privdata) +static int at2_open_device1(PrivAT2data *privdata) { info(0, "AT2[%s]: opening device", octstr_get_cstr(privdata->name)); privdata->fd = open(octstr_get_cstr(privdata->device), Index: gw/smsc_cgw.c =================================================================== RCS file: /home/cvs/gateway/gw/smsc_cgw.c,v retrieving revision 1.3 diff -u -r1.3 smsc_cgw.c --- gw/smsc_cgw.c 21 Mar 2002 09:51:10 -0000 1.3 +++ gw/smsc_cgw.c 31 Jul 2002 14:18:52 -0000 @@ -119,7 +119,6 @@ PrivData; -int smsc_cgw_create(SMSCConn *conn, CfgGroup *cfg); static int cgw_add_msg_cb(SMSCConn *conn, Msg *sms); static int cgw_shutdown_cb(SMSCConn *conn, int finish_sending); static void cgw_start_cb(SMSCConn *conn); Index: gw/smscconn.c =================================================================== RCS file: /home/cvs/gateway/gw/smscconn.c,v retrieving revision 1.27 diff -u -r1.27 smscconn.c --- gw/smscconn.c 15 Jan 2002 10:17:01 -0000 1.27 +++ gw/smscconn.c 31 Jul 2002 14:18:53 -0000 @@ -13,6 +13,7 @@ #include "smscconn.h" #include "smscconn_p.h" #include "bb_smscconn_cb.h" +#include "smsc_at2.h" SMSCConn *smscconn_create(CfgGroup *grp, int start_as_stopped) Index: gw/smscconn_p.h =================================================================== RCS file: /home/cvs/gateway/gw/smscconn_p.h,v retrieving revision 1.28 diff -u -r1.28 smscconn_p.h --- gw/smscconn_p.h 3 May 2002 04:02:26 -0000 1.28 +++ gw/smscconn_p.h 31 Jul 2002 14:18:53 -0000 @@ -184,9 +184,6 @@ /* Responsible file: smsc_smpp.c */ int smsc_smpp_create(SMSCConn *conn, CfgGroup *cfg); -/* Responsible file: smsc_at2.c */ -int smsc_at2_create(SMSCConn *conn, CfgGroup *cfg); - /* Responsible file: smsc_cgw.c */ int smsc_cgw_create(SMSCConn *conn, CfgGroup *cfg); Index: gw/urltrans.h =================================================================== RCS file: /home/cvs/gateway/gw/urltrans.h,v retrieving revision 1.27 diff -u -r1.27 urltrans.h --- gw/urltrans.h 15 Jul 2002 11:59:05 -0000 1.27 +++ gw/urltrans.h 31 Jul 2002 14:18:53 -0000 @@ -241,6 +241,8 @@ /* Return allowed and denied prefixes */ Octstr *urltrans_allowed_prefix(URLTranslation *t); Octstr *urltrans_denied_prefix(URLTranslation *t); +Octstr *urltrans_allowed_recv_prefix(URLTranslation *t); +Octstr *urltrans_denied_recv_prefix(URLTranslation *t); /* Return white and black to number list */ Numhash *urltrans_white_list(URLTranslation *t); Index: gw/wap-appl.c =================================================================== RCS file: /home/cvs/gateway/gw/wap-appl.c,v retrieving revision 1.69 diff -u -r1.69 wap-appl.c --- gw/wap-appl.c 13 May 2002 23:57:36 -0000 1.69 +++ gw/wap-appl.c 31 Jul 2002 14:18:55 -0000 @@ -26,6 +26,7 @@ #include "gwlib/gwlib.h" #include "wmlscript/ws.h" +#include "xml_shared.h" #include "wml_compiler.h" #include "wap/wap.h" #include "wap-appl.h" Index: gw/wap-error.c =================================================================== RCS file: /home/cvs/gateway/gw/wap-error.c,v retrieving revision 1.2 diff -u -r1.2 wap-error.c --- gw/wap-error.c 2 May 2002 14:44:54 -0000 1.2 +++ gw/wap-error.c 31 Jul 2002 14:18:55 -0000 @@ -6,6 +6,7 @@ #include "gwlib/gwlib.h" #include "wap/wsp.h" +#include "wap-error.h" Octstr* error_requesting_back(Octstr *url, Octstr *referer) { Index: gw/wap-error.h =================================================================== RCS file: /home/cvs/gateway/gw/wap-error.h,v retrieving revision 1.1 diff -u -r1.1 wap-error.h --- gw/wap-error.h 22 Apr 2002 15:23:51 -0000 1.1 +++ gw/wap-error.h 31 Jul 2002 14:18:55 -0000 @@ -7,7 +7,7 @@ #include "wap/wap.h" -Octstr* error_requesting_back(Octstr *url, Octstr *referer_url); +Octstr* error_requesting_back(Octstr *url, Octstr *referer); Octstr* error_requesting(Octstr *url); #endif Index: gw/wml_compiler.h =================================================================== RCS file: /home/cvs/gateway/gw/wml_compiler.h,v retrieving revision 1.9 diff -u -r1.9 wml_compiler.h --- gw/wml_compiler.h 19 Sep 2000 09:06:24 -0000 1.9 +++ gw/wml_compiler.h 31 Jul 2002 14:18:56 -0000 @@ -31,33 +31,21 @@ * * Errors are logged with a little explanation and error number. */ - - int wml_compile(Octstr *wml_text, Octstr *charset, Octstr **wml_binary); - -/* - * Return the character sets supported by the WML compiler, as a List - * of Octstrs, where each string is the MIME identifier for one charset. - */ - -void wml_init(void); - /* * A function to initialize the wml compiler for use. Allocates memory * for the tables wml compiler uses. */ - -void wml_shutdown(void); +void wml_init(void); /* * A function for shutting down the wml_compiler. Frees the memory used * by the wml compiler. */ +void wml_shutdown(void); - -List *wml_charsets(void); #endif Index: gw/xml_shared.c =================================================================== RCS file: /home/cvs/gateway/gw/xml_shared.c,v retrieving revision 1.3 diff -u -r1.3 xml_shared.c --- gw/xml_shared.c 23 Nov 2001 12:41:17 -0000 1.3 +++ gw/xml_shared.c 31 Jul 2002 14:18:56 -0000 @@ -157,7 +157,10 @@ return status_bits; } - +/* + * Return the character sets supported by the WML compiler, as a List + * of Octstrs, where each string is the MIME identifier for one charset. + */ List *wml_charsets(void) { int i; Index: gw/xml_shared.h =================================================================== RCS file: /home/cvs/gateway/gw/xml_shared.h,v retrieving revision 1.3 diff -u -r1.3 xml_shared.h --- gw/xml_shared.h 23 Nov 2001 12:41:11 -0000 1.3 +++ gw/xml_shared.h 31 Jul 2002 14:18:56 -0000 @@ -60,6 +60,10 @@ */ int parse_charset(Octstr *charset); +/* + * Return the character sets supported by the WML compiler, as a List + * of Octstrs, where each string is the MIME identifier for one charset. + */ List *wml_charsets(void); /* 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 14:18:57 -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); @@ -248,7 +248,7 @@ } -List *expand_file(Octstr *file, int forward) +static List *expand_file(Octstr *file, int forward) { Octstr *os; Octstr *line; Index: gwlib/xmlrpc.h =================================================================== RCS file: /home/cvs/gateway/gwlib/xmlrpc.h,v retrieving revision 1.8 diff -u -r1.8 xmlrpc.h --- gwlib/xmlrpc.h 20 May 2002 14:16:53 -0000 1.8 +++ gwlib/xmlrpc.h 31 Jul 2002 14:18:59 -0000 @@ -132,6 +132,10 @@ XMLRPCScalar *xmlrpc_scalar_create(int type, void *arg); XMLRPCScalar *xmlrpc_scalar_create_double(int type, double val); +/* Create a new sturct of given type and value + * (which must be in right format) */ +XMLRPCValue *xmlrpc_create_struct_value(int type, void *arg); + /* Destroy scalar */ void xmlrpc_scalar_destroy(XMLRPCScalar *scalar);