Changeset 4864

Show
Ignore:
Timestamp:
06/30/09 14:39:21 (5 months ago)
Author:
buntinas
Message:

added and removed warning options to reduce the number of nonessential warnings

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • mpich2/trunk/confdb/aclocal_cc.m4

    r4854 r4864  
    10711071export enable_strict_done 
    10721072if test "$enable_strict_done" != "yes" ; then 
     1073 
     1074    # Some comments on strict warning options. 
     1075    # These were added to reduce warnings: 
     1076    #   -Wno-missing-field-initializers  -- We want to allow a struct to be  
     1077    #       initialized to zero using "struct x y = {0};" and not require  
     1078    #       each field to be initialized individually. 
     1079    #   -Wno-type-limits -- There are places where we compare an unsigned to  
     1080    #       a constant that happens to be zero e.g., if x is unsigned and  
     1081    #       MIN_VAL is zero, we'd like to do "MPIU_Assert(x >= MIN_VAL);". 
     1082    #       Note this option is not supported by gcc 4.2. 
     1083    #   -Wno-unused-parameter -- For portability, some parameters go unused 
     1084    #       when we have different implementations of functions for  
     1085    #       different platforms 
     1086    #   -Wno-unused-label -- We add fn_exit: and fn_fail: on all functions,  
     1087    #       but fn_fail may not be used if the function doesn't return an  
     1088    #       error. 
     1089    # These were removed to reduce warnings: 
     1090    #   -Wcast-qual -- Sometimes we need to cast "volatile char*" to  
     1091    #       "char*", e.g., for memcpy. 
     1092    #   -Wpadded -- We catch struct padding with asserts when we need to 
     1093    #   -Wredundant-decls -- Having redundant declarations is benign and the  
     1094    #       code already has some. 
     1095 
     1096    pac_common_strict_flags="-O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wstrict-prototypes -Wmissing-prototypes -DGCC_WALL -Wno-unused-parameter -Wno-unused-label -Wshadow -Wmissing-declarations -Wno-long-long -Wfloat-equal -Wdeclaration-after-statement -Wundef -Wno-endif-labels -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wsign-compare -Waggregate-return -Wold-style-definition -Wmissing-noreturn -Wmissing-format-attribute -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wnested-externs -Winline -Winvalid-pch -Wno-pointer-sign -Wvariadic-macros -std=c89" 
    10731097    pac_cc_strict_flags="" 
    1074     pac_common_strict_flags="-O2 -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -DGCC_WALL -Wunused -Wshadow -Wmissing-declarations -Wno-long-long -Wunused-value -Wno-unused-parameter -Wfloat-equal -Wdeclaration-after-statement -Wundef -Wno-endif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wsign-compare -Waggregate-return -Wold-style-definition -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-format-attribute -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wnested-externs -Winline -Winvalid-pch -Wno-pointer-sign -Wvariadic-macros -std=c89" 
    10751098    case "$1" in  
    10761099        yes|all) 
     
    10801103 
    10811104        posix) 
    1082                 # fsync is a part of POSIX only in the real-time 
    1083                 # extensions, apparently, so code that used include 
    1084                 # <unistd.h> and POSIX and expects fsync to be defined 
    1085                 # is in trouble.  Because of that we're not including 
    1086                 # the -W option to error if a function is not 
    1087                 # prototyped. 
    10881105                enable_strict_done="yes" 
    10891106                pac_cc_strict_flags="$pac_common_strict_flags -D_POSIX_C_SOURCE=199506L"