[mpich-discuss] GCC 4.7.2 warnings

Darius Buntinas buntinas at mcs.anl.gov
Thu Sep 27 12:41:29 CDT 2012


Thanks for the info.  We'll take a look at those additional warning flags.  You can see what warning flags we use (with -enable-strict) in confdb/aclocal_cc.m4

-d


On Sep 27, 2012, at 12:08 PM, Yauheni Zelenko wrote:

> Hi, Darius!
> 
> It's Red Hat Enterprise Linux 6.
> 
> uname -a output:
> 
> Linux intel-eval-ns 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
> 
> Configure options:
> 
> setenv PATH "/grid/common/pkgs/binutils/v2.20/bin:${PATH}"
> 
> set InstallDir=${PWD}/../install
> 
> ./configure --prefix=${InstallDir}                                      \
>        --with-pm=hydra --with-device=ch3:nemesis                       \
>        --disable-chekpointing                                          \
>        --enable-strict --enable-fast=O3                                \
>        --disable-f77 --disable-fc                                      \
>        CC=/gcc-4.7.2/bin/gcc CFLAGS="-m32 -fPIC"                       \
>        CPP=/gcc-4.7.2/bin/cpp                                          \
>        CXX=/gcc-4.7.2/bin/g++ CXXFLAGS="-m32 -fPIC"                    \
>        CXXCPP=/gcc-4.7.2/bin/cpp
> 
> However I think will be good idea to use next set of GCC warnings flags
> 
> Common:
> 
> -Wall -Winit-self -Wswitch -Wformat=2 -Wredundant-decls -Wextra -Wno-unused-parameter
> 
> C specific in addition to common:
> 
> -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wnested-externs
> 
> C++ specific in addition to common (last one for GCC 4.4.x and up, definitely not in 4.1.x):
> 
> -Woverloaded-virtual -Wmissing-declarations
> 
> Eugene.
> ________________________________________
> From: mpich-discuss-bounces at mcs.anl.gov [mpich-discuss-bounces at mcs.anl.gov] On Behalf Of Darius Buntinas [buntinas at mcs.anl.gov]
> Sent: Thursday, September 27, 2012 8:20 AM
> To: mpich-discuss at mcs.anl.gov
> Subject: Re: [mpich-discuss] GCC 4.7.2 warnings
> 
> Can you also send us the options you passed to configure?  What kind of machine are you running this on (e.g., the output of "uname -a").?
> 
> Thanks,
> -d
> 
> On Sep 26, 2012, at 7:11 PM, Yauheni Zelenko wrote:
> 
>> Hi!
>> 
>> I tried to compile r10272 tarball with GCC 4.7.2 and got next warnings which I think will be good idea to fix.
>> 
>> src/mpltrmem.c: In function 'MPL_trdump':
>> src/mpltrmem.c:536:14: warning: variable 'old_head' set but not used [-Wunused-but-set-variable]
>> iterator.c: In function 'MPE_CallStack_iteratorInit':
>> iterator.c:40:12: warning: variable 'ierr' set but not used [-Wunused-but-set-variable]
>> fancyprint.c: In function 'MPE_CallStack_fancyprint':
>> fancyprint.c:39:12: warning: variable 'ierr' set but not used [-Wunused-but-set-variable]
>> clog_util.c: In function 'CLOG_Util_abort':
>> clog_util.c:54:22: warning: variable 'isz' set but not used [-Wunused-but-set-variable]
>> clog_commset.c: In function 'CLOG_CommSet_add_intracomm':
>> clog_commset.c:310:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>> clog_commset.c: In function 'CLOG_CommSet_add_intercomm':
>> clog_commset.c:369:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>> mpi-io/read.c: In function 'MPIOI_File_read':
>> mpi-io/read.c:127:9: warning: implicit declaration of function 'MPIU_datatype_full_size' [-Wimplicit-function-declaration]
>> mpi-io/read.c:127:9: warning: nested extern declaration of 'MPIU_datatype_full_size' [-Wnested-externs]
>> mpi-io/read.c:173:9: warning: implicit declaration of function 'MPIU_read_external32_conversion_fn' [-Wimplicit-function-declaration]
>> mpi-io/read.c:173:9: warning: nested extern declaration of 'MPIU_read_external32_conversion_fn' [-Wnested-externs]
>> mpi-io/read_all.c: In function 'MPIOI_File_read_all':
>> mpi-io/read_all.c:110:9: warning: implicit declaration of function 'MPIU_datatype_full_size' [-Wimplicit-function-declaration]
>> mpi-io/read_all.c:110:9: warning: nested extern declaration of 'MPIU_datatype_full_size' [-Wnested-externs]
>> mpi-io/read_all.c:127:9: warning: implicit declaration of function 'MPIU_read_external32_conversion_fn' [-Wimplicit-function-declaration]
>> mpi-io/read_all.c:127:9: warning: nested extern declaration of 'MPIU_read_external32_conversion_fn' [-Wnested-externs]
>> mpi-io/read_allb.c: In function 'MPIOI_File_read_all_begin':
>> mpi-io/read_allb.c:107:9: warning: implicit declaration of function 'MPIU_datatype_full_size' [-Wimplicit-function-declaration]
>> mpi-io/read_allb.c:107:9: warning: nested extern declaration of 'MPIU_datatype_full_size' [-Wnested-externs]
>> mpi-io/read_allb.c:124:9: warning: implicit declaration of function 'MPIU_read_external32_conversion_fn' [-Wimplicit-function-declaration]
>> mpi-io/read_allb.c:124:9: warning: nested extern declaration of 'MPIU_read_external32_conversion_fn' [-Wnested-externs]
>> mpi-io/read_ordb.c: In function 'PMPI_File_read_ordered_begin':
>> mpi-io/read_ordb.c:105:9: warning: implicit declaration of function 'MPIU_datatype_full_size' [-Wimplicit-function-declaration]
>> mpi-io/read_ordb.c:105:9: warning: nested extern declaration of 'MPIU_datatype_full_size' [-Wnested-externs]
>> mpi-io/read_ordb.c:123:9: warning: implicit declaration of function 'MPIU_read_external32_conversion_fn' [-Wimplicit-function-declaration]
>> mpi-io/read_ordb.c:123:9: warning: nested extern declaration of 'MPIU_read_external32_conversion_fn' [-Wnested-externs]
>> mpi-io/read_sh.c: In function 'PMPI_File_read_shared':
>> mpi-io/read_sh.c:102:9: warning: implicit declaration of function 'MPIU_datatype_full_size' [-Wimplicit-function-declaration]
>> mpi-io/read_sh.c:102:9: warning: nested extern declaration of 'MPIU_datatype_full_size' [-Wnested-externs]
>> mpi-io/read_sh.c:143:9: warning: implicit declaration of function 'MPIU_read_external32_conversion_fn' [-Wimplicit-function-declaration]
>> mpi-io/read_sh.c:143:9: warning: nested extern declaration of 'MPIU_read_external32_conversion_fn' [-Wnested-externs]
>> mpi-io/write.c: In function 'MPIOI_File_write':
>> mpi-io/write.c:126:2: warning: implicit declaration of function 'MPIU_external32_buffer_setup' [-Wimplicit-function-declaration]
>> mpi-io/write.c:126:2: warning: nested extern declaration of 'MPIU_external32_buffer_setup' [-Wnested-externs]
>> mpi-io/write_all.c: In function 'MPIOI_File_write_all':
>> mpi-io/write_all.c:109:2: warning: implicit declaration of function 'MPIU_external32_buffer_setup' [-Wimplicit-function-declaration]
>> mpi-io/write_all.c:109:2: warning: nested extern declaration of 'MPIU_external32_buffer_setup' [-Wnested-externs]
>> mpi-io/write_allb.c: In function 'MPIOI_File_write_all_begin':
>> mpi-io/write_allb.c:105:2: warning: implicit declaration of function 'MPIU_external32_buffer_setup' [-Wimplicit-function-declaration]
>> mpi-io/write_allb.c:105:2: warning: nested extern declaration of 'MPIU_external32_buffer_setup' [-Wnested-externs]
>> mpi-io/write_ord.c: In function 'PMPI_File_write_ordered':
>> mpi-io/write_ord.c:100:2: warning: implicit declaration of function 'MPIU_external32_buffer_setup' [-Wimplicit-function-declaration]
>> mpi-io/write_ord.c:100:2: warning: nested extern declaration of 'MPIU_external32_buffer_setup' [-Wnested-externs]
>> mpi-io/write_ordb.c: In function 'PMPI_File_write_ordered_begin':
>> mpi-io/write_ordb.c:106:2: warning: implicit declaration of function 'MPIU_external32_buffer_setup' [-Wimplicit-function-declaration]
>> mpi-io/write_ordb.c:106:2: warning: nested extern declaration of 'MPIU_external32_buffer_setup' [-Wnested-externs]
>> mpi-io/write_sh.c: In function 'PMPI_File_write_shared':
>> mpi-io/write_sh.c:102:2: warning: implicit declaration of function 'MPIU_external32_buffer_setup' [-Wimplicit-function-declaration]
>> mpi-io/write_sh.c:102:2: warning: nested extern declaration of 'MPIU_external32_buffer_setup' [-Wnested-externs]
>> mpi-io/mpiu_external32.c: In function 'MPIU_write_external32_conversion_fn':
>> mpi-io/mpiu_external32.c:24:5: warning: implicit declaration of function 'MPIR_Datatype_iscontig' [-Wimplicit-function-declaration]
>> mpi-io/mpiu_external32.c:24:5: warning: nested extern declaration of 'MPIR_Datatype_iscontig' [-Wnested-externs]
>> mpi-io/mpiu_external32.c:25:5: warning: passing argument 1 of 'MPI_Pack_external_size' discards 'const' qualifier from pointer target type [enabled by default]
>> In file included from ./adio/include/adio.h:72:0,
>>                from mpi-io/mpioimpl.h:15,
>>                from mpi-io/mpiu_external32.c:6:
>> /home/zelenko/Installs/mpich2-r10272/source/src/include/mpi.h:1137:5: note: expected 'char *' but argument is of type 'const char *'
>> mpi-io/mpiu_external32.c:32:17: warning: passing argument 1 of 'MPI_Pack_external' discards 'const' qualifier from pointer target type [enabled by default]
>> In file included from ./adio/include/adio.h:72:0,
>>                from mpi-io/mpioimpl.h:15,
>>                from mpi-io/mpiu_external32.c:6:
>> /home/zelenko/Installs/mpich2-r10272/source/src/include/mpi.h:1135:5: note: expected 'char *' but argument is of type 'const char *'
>> mpi-io/mpiu_external32.c:47:17: warning: passing argument 1 of 'MPI_Pack_external' discards 'const' qualifier from pointer target type [enabled by default]
>> In file included from ./adio/include/adio.h:72:0,
>>                from mpi-io/mpioimpl.h:15,
>>                from mpi-io/mpiu_external32.c:6:
>> /home/zelenko/Installs/mpich2-r10272/source/src/include/mpi.h:1135:5: note: expected 'char *' but argument is of type 'const char *'
>> mpi-io/mpiu_external32.c: In function 'MPIU_read_external32_conversion_fn':
>> mpi-io/mpiu_external32.c:78:5: warning: passing argument 1 of 'MPI_Pack_external_size' discards 'const' qualifier from pointer target type [enabled by default]
>> In file included from ./adio/include/adio.h:72:0,
>>                from mpi-io/mpioimpl.h:15,
>>                from mpi-io/mpiu_external32.c:6:
>> /home/zelenko/Installs/mpich2-r10272/source/src/include/mpi.h:1137:5: note: expected 'char *' but argument is of type 'const char *'
>> mpi-io/mpiu_external32.c:85:17: warning: passing argument 1 of 'MPI_Unpack_external' discards 'const' qualifier from pointer target type [enabled by default]
>> In file included from ./adio/include/adio.h:72:0,
>>                from mpi-io/mpioimpl.h:15,
>>                from mpi-io/mpiu_external32.c:6:
>> /home/zelenko/Installs/mpich2-r10272/source/src/include/mpi.h:1157:5: note: expected 'char *' but argument is of type 'const char *'
>> mpi-io/mpiu_external32.c:108:17: warning: passing argument 1 of 'MPI_Unpack_external' discards 'const' qualifier from pointer target type [enabled by default]
>> In file included from ./adio/include/adio.h:72:0,
>>                from mpi-io/mpioimpl.h:15,
>>                from mpi-io/mpiu_external32.c:6:
>> /home/zelenko/Installs/mpich2-r10272/source/src/include/mpi.h:1157:5: note: expected 'char *' but argument is of type 'const char *'
>> mpi-io/mpiu_external32.c: In function 'MPIU_datatype_full_size':
>> mpi-io/mpiu_external32.c:123:14: warning: unused variable 'extent' [-Wunused-variable]
>> ./pm/pmiserv/pmiserv_utils.c: In function 'HYD_pmcd_pmi_fill_in_exec_launch_info':
>> ./pm/pmiserv/pmiserv_utils.c:521:5: warning: 'nonfiller_pmi_ids' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> ./pm/pmiserv/pmiserv_utils.c:520:5: warning: 'filler_pmi_ids' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> ./pm/pmiserv/pmip_cb.c: In function 'parse_exec_params':
>> ./pm/pmiserv/pmip_cb.c:808:9: warning: null argument where non-null required (argument 1) [-Wnonnull]
>> ./pm/pmiserv/pmip_cb.c:808:9: warning: null argument where non-null required (argument 1) [-Wnonnull]
>> ./pm/pmiserv/pmip_cb.c:808:9: warning: null argument where non-null required (argument 2) [-Wnonnull]
>> ./pm/pmiserv/pmip_cb.c:808:9: warning: null argument where non-null required (argument 2) [-Wnonnull]
>> src/mpi/coll/opminloc.c: In function 'MPIR_MINLOC':
>> src/mpi/coll/opminloc.c:85:24: warning: variable 'flen' set but not used [-Wunused-but-set-variable]
>> src/mpi/coll/opmaxloc.c: In function 'MPIR_MAXLOC':
>> src/mpi/coll/opmaxloc.c:86:24: warning: variable 'flen' set but not used [-Wunused-but-set-variable]
>> src/mpid/ch3/src/ch3u_rma_sync.c: In function 'MPIDI_CH3I_Recv_rma_msg':
>> src/mpid/ch3/src/ch3u_rma_sync.c:1124:5: warning: 'mpiu_chkpmem_stk_[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> src/mpid/ch3/src/mpidi_pg.c: In function 'connToString':
>> src/mpid/ch3/src/mpidi_pg.c:972:5: warning: 'mpiu_chkpmem_stk_[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> src/mpid/ch3/channels/nemesis/src/ch3_progress.c: In function 'MPIDI_CH3I_Progress':
>> src/mpid/ch3/channels/nemesis/src/ch3_progress.c:394:21: warning: comparison between 'MPIDI_CH3_Pkt_type_t' and 'enum MPID_nem_pkt_type' [-Wenum-compare]
>> src/mpid/ch3/channels/nemesis/src/ch3_progress.c: In function 'MPID_nem_handle_pkt':
>> src/mpid/ch3/channels/nemesis/src/ch3_progress.c:636:17: warning: comparison between 'MPIDI_CH3_Pkt_type_t' and 'enum MPID_nem_pkt_type' [-Wenum-compare]
>> src/mpid/ch3/channels/nemesis/src/ch3_progress.c:684:13: warning: comparison between 'MPIDI_CH3_Pkt_type_t' and 'enum MPID_nem_pkt_type' [-Wenum-compare]
>> src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c: In function 'alloc_sc_plfd_tbls':
>> src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c:183:5: warning: the comparison will always evaluate as 'true' for the address of 'MPID_nem_tcp_g_lstn_sc' will never be NULL [-Waddress]
>> src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c:184:5: warning: the comparison will always evaluate as 'true' for the address of 'MPID_nem_tcp_g_lstn_plfd' will never be NULL [-Waddress]
>> src/mpid/common/datatype/mpid_type_debug.c: In function 'MPIDI_Datatype_printf':
>> src/mpid/common/datatype/mpid_type_debug.c:238:59: warning: variable 'sticky_ub' set but not used [-Wunused-but-set-variable]
>> src/mpid/common/datatype/mpid_type_debug.c:238:48: warning: variable 'sticky_lb' set but not used [-Wunused-but-set-variable]
>> src/mpid/common/datatype/mpid_type_debug.c:238:44: warning: variable 'ub' set but not used [-Wunused-but-set-variable]
>> src/mpid/common/datatype/mpid_type_debug.c:238:31: warning: variable 'true_ub' set but not used [-Wunused-but-set-variable]
>> src/mpid/common/datatype/mpid_type_debug.c:236:11: warning: variable 'string' set but not used [-Wunused-but-set-variable]
>> src/mpi/coll/iallgather.c: In function 'MPIR_Iallgather_bruck':
>> src/mpi/coll/iallgather.c:329:5: warning: 'mpir_sched_chkpmem_stk_[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> src/mpi/coll/iallgather.c: In function 'MPIR_Iallgather_inter':
>> src/mpi/coll/iallgather.c:580:5: warning: 'mpir_sched_chkpmem_stk_[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> src/mpi/coll/iallgatherv.c: In function 'MPIR_Iallgatherv_rec_dbl':
>> src/mpi/coll/iallgatherv.c:257:5: warning: 'mpir_sched_chkpmem_stk_[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> src/mpi/coll/iallgatherv.c: In function 'MPIR_Iallgatherv_bruck':
>> src/mpi/coll/iallgatherv.c:394:5: warning: 'mpir_sched_chkpmem_stk_[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> src/mpi/coll/iallreduce.c: In function 'MPIR_Iallreduce_redscat_allgather':
>> src/mpi/coll/iallreduce.c:282:5: warning: 'mpir_sched_chkpmem_stk_[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> src/mpi/coll/iallreduce.c: In function 'MPIR_Iallreduce_rec_dbl':
>> src/mpi/coll/iallreduce.c:425:5: warning: 'mpir_sched_chkpmem_stk_[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> src/mpi/coll/ired_scat_block.c: In function 'MPIR_Ireduce_scatter_block_inter':
>> src/mpi/coll/ired_scat_block.c:899:5: warning: 'mpir_sched_chkpmem_stk_[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> src/mpi/coll/ireduce.c: In function 'MPIR_Ireduce_SMP':
>> src/mpi/coll/ireduce.c:677:5: warning: 'mpir_sched_chkpmem_stk_[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> 
>> Eugene.
>> _______________________________________________
>> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
>> To manage subscription options or unsubscribe:
>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> 
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list