Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-414

Fix compilation warnings in the native part

XMLWordPrintable

      There are currently 14 warnings:

      [rhusar@x220 native]$ for x in advertise mod_cluster_slotmem mod_manager mod_proxy_cluster; do cd $x; ./buildconf; ./configure --with-apxs=/usr/bin/apxs; make clean; make; cd ..; done
      Creating configure ...
      checking for Apache httpd installation... APXS is /usr/bin/apxs
      apxs_support is true
      configure: creating ./config.status
      config.status: creating Makefile
      make[1]: Entering directory `/home/rhusar/git/mod_cluster/native/advertise'
      rm -f *.o *.lo *.slo *.obj *.a *.la  
      rm -rf .libs
      make[1]: Leaving directory `/home/rhusar/git/mod_cluster/native/advertise'
      rm -f *.o *.lo *.slo *.so
      rm -rf .libs
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c mod_advertise.c && touch mod_advertise.slo
      mod_advertise.c: In function 'cmd_advertise_g':
      mod_advertise.c:178:34: warning: comparison with string literal results in unspecified behavior [-Waddress]
               mconf->ma_advertise_adrs != MA_DEFAULT_GROUP)
                                        ^
      mod_advertise.c: In function 'post_config_hook':
      mod_advertise.c:657:13: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Wformat=]
                   ptr = apr_psprintf(pproc, "%s:%lu", ma_server_rec->server_hostname, port);
                   ^
      mod_advertise.c: In function 'advertise_info':
      mod_advertise.c:734:24: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Wformat=]
                              );
                              ^
      mod_advertise.c: At top level:
      mod_advertise.c:89:26: warning: 'ma_listen_socket' defined but not used [-Wunused-variable]
       static apr_socket_t     *ma_listen_socket = NULL;
                                ^
      /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic     -Wl,-z,relro,-z,now    -o mod_advertise.la -rpath /usr/lib64/httpd/modules -module -avoid-version  mod_advertise.lo
      /usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool --silent' mod_advertise.la `pwd`
      /usr/lib64/apr-1/build/libtool --silent --mode=install install mod_advertise.la /home/rhusar/modc/native/advertise/
      libtool: install: warning: remember to run `libtool --finish /usr/lib64/httpd/modules'
      Creating configure ...
      checking for Apache httpd installation... APXS is /usr/bin/apxs
      apxs_support is true
      configure: creating ./config.status
      config.status: creating Makefile
      make[1]: Entering directory `/home/rhusar/git/mod_cluster/native/mod_cluster_slotmem'
      rm -f *.o *.lo *.slo *.obj *.a *.la  
      rm -rf .libs
      make[1]: Leaving directory `/home/rhusar/git/mod_cluster/native/mod_cluster_slotmem'
      rm -f *.o *.lo *.slo *.so
      rm -rf .libs
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c sharedmem_util.c && touch sharedmem_util.slo
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c mod_sharedmem.c && touch mod_sharedmem.slo
      /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic     -Wl,-z,relro,-z,now    -o mod_cluster_slotmem.la -rpath /usr/lib64/httpd/modules -module -avoid-version  mod_sharedmem.lo sharedmem_util.lo
      /usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool --silent' mod_cluster_slotmem.la `pwd`
      /usr/lib64/apr-1/build/libtool --silent --mode=install install mod_cluster_slotmem.la /home/rhusar/modc/native/mod_cluster_slotmem/
      libtool: install: warning: remember to run `libtool --finish /usr/lib64/httpd/modules'
      Creating configure ...
      checking for Apache httpd installation... APXS is /usr/bin/apxs
      apxs_support is true
      configure: creating ./config.status
      config.status: creating Makefile
      make[1]: Entering directory `/home/rhusar/git/mod_cluster/native/mod_manager'
      rm -f *.o *.lo *.slo *.obj *.a *.la  
      rm -rf .libs
      make[1]: Leaving directory `/home/rhusar/git/mod_cluster/native/mod_manager'
      rm -f *.o *.lo *.slo *.so
      rm -rf .libs
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c mod_manager.c && touch mod_manager.slo
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c node.c && touch node.slo
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c context.c && touch context.slo
      context.c: In function 'remove_context':
      context.c:182:5: warning: 'rv' may be used uninitialized in this function [-Wmaybe-uninitialized]
           return rv;
           ^
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c host.c && touch host.slo
      host.c: In function 'remove_host':
      host.c:179:5: warning: 'rv' may be used uninitialized in this function [-Wmaybe-uninitialized]
           return rv;
           ^
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c balancer.c && touch balancer.slo
      balancer.c: In function 'remove_balancer':
      balancer.c:179:5: warning: 'rv' may be used uninitialized in this function [-Wmaybe-uninitialized]
           return rv;
           ^
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c sessionid.c && touch sessionid.slo
      sessionid.c: In function 'remove_sessionid':
      sessionid.c:179:5: warning: 'rv' may be used uninitialized in this function [-Wmaybe-uninitialized]
           return rv;
           ^
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c domain.c && touch domain.slo
      domain.c: In function 'remove_domain':
      domain.c:179:5: warning: 'rv' may be used uninitialized in this function [-Wmaybe-uninitialized]
           return rv;
           ^
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c jgroupsid.c && touch jgroupsid.slo
      jgroupsid.c: In function 'remove_jgroupsid':
      jgroupsid.c:175:5: warning: 'rv' may be used uninitialized in this function [-Wmaybe-uninitialized]
           return rv;
           ^
      /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic     -Wl,-z,relro,-z,now    -o mod_manager.la -rpath /usr/lib64/httpd/modules -module -avoid-version  mod_manager.lo node.lo context.lo host.lo balancer.lo sessionid.lo domain.lo jgroupsid.lo
      /usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool --silent' mod_manager.la `pwd`
      /usr/lib64/apr-1/build/libtool --silent --mode=install install mod_manager.la /home/rhusar/modc/native/mod_manager/
      libtool: install: warning: remember to run `libtool --finish /usr/lib64/httpd/modules'
      Creating configure ...
      checking for Apache httpd installation... APXS is /usr/bin/apxs
      apxs_support is true
      configure: creating ./config.status
      config.status: creating Makefile
      make[1]: Entering directory `/home/rhusar/git/mod_cluster/native/mod_proxy_cluster'
      rm -f *.o *.lo *.slo *.obj *.a *.la  
      rm -rf .libs
      make[1]: Leaving directory `/home/rhusar/git/mod_cluster/native/mod_proxy_cluster'
      rm -f *.o *.lo *.slo *.so
      rm -rf .libs
      /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/usr/include/httpd -I. -I/usr/include/apr-1 -I../include -prefer-pic -c mod_proxy_cluster.c && touch mod_proxy_cluster.slo
      mod_proxy_cluster.c: In function 'add_balancer_node':
      mod_proxy_cluster.c:677:12: warning: unused variable 'sizew' [-Wunused-variable]
              int sizew = conf->workers->elt_size;
                  ^
      mod_proxy_cluster.c: In function 'remove_workers_node':
      mod_proxy_cluster.c:958:13: warning: unused variable 'sizeb' [-Wunused-variable]
               int sizeb = conf->balancers->elt_size;
                   ^
      mod_proxy_cluster.c:957:15: warning: unused variable 'ptr' [-Wunused-variable]
               char *ptr = conf->balancers->elts;
                     ^
      mod_proxy_cluster.c:956:15: warning: unused variable 'name' [-Wunused-variable]
               char *name = apr_pstrcat(pool, "balancer://", node->mess.balancer, NULL);
                     ^
      mod_proxy_cluster.c: In function 'proxy_cluster_try_pingpong':
      mod_proxy_cluster.c:1419:9: warning: format '%d' expects argument of type 'int', but argument 8 has type 'struct conn_rec *' [-Wformat=]
               ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
               ^
      mod_proxy_cluster.c: In function 'proxy_cluster_post_config':
      mod_proxy_cluster.c:2669:17: warning: unused variable 'userdata_key' [-Wunused-variable]
           const char *userdata_key = "mod_cluster_init";
                       ^
      mod_proxy_cluster.c: In function 'find_node_context_host.isra.19':
      mod_proxy_cluster.c:1709:21: warning: 'balancer' may be used uninitialized in this function [-Wmaybe-uninitialized]
           proxy_balancer *balancer;
                           ^
      /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic     -Wl,-z,relro,-z,now    -o mod_proxy_cluster.la -rpath /usr/lib64/httpd/modules -module -avoid-version mod_proxy_cluster.lo 
      /usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool --silent' mod_proxy_cluster.la `pwd`
      /usr/lib64/apr-1/build/libtool --silent --mode=install install mod_proxy_cluster.la /home/rhusar/modc/native/mod_proxy_cluster/
      libtool: install: warning: remember to run `libtool --finish /usr/lib64/httpd/modules'
      

              rhn-engineering-rhusar Radoslav Husar
              rhn-engineering-rhusar Radoslav Husar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: