schwehr / hdf5-old

Hierarchical Data Format (HDF) 5
Other
0 stars 0 forks source link

ifdef causes complaint about extra parens #3

Open schwehr opened 10 years ago

schwehr commented 10 years ago
clang -DHAVE_CONFIG_H -I. -I/sw/include -UNDEBUG -DH5AC_DEBUG -DH5B_DEBUG -DH5B2_DEBUG -DH5D_DEBUG -DH5E_DEBUG -DH5F_DEBUG -DH5G_DEBUG -DH5HG_DEBUG -DH5HL_DEBUG -DH5I_DEBUG -DH5MF_DEBUG -DH5MM_DEBUG -DH5O_DEBUG -DH5P_DEBUG -DH5S_DEBUG -DH5T_DEBUG -DH5V_DEBUG -DH5Z_DEBUG -DH5_DEBUG_API -Wall -Wextra -MT H5AC.lo -MD -MP -MF .deps/H5AC.Tpo -c H5AC.c  -fno-common -DPIC -o .libs/H5AC.o
H5AC.c:2126:22: warning: equality comparison with extraneous parentheses
      [-Wparentheses-equality]
    if ( ( cache_ptr == NULL )
           ~~~~~~~~~~^~~~~~~
H5AC.c:2126:22: note: remove extraneous parentheses around the comparison to
      silence this warning
    if ( ( cache_ptr == NULL )

This code:

    if ( ( cache_ptr == NULL )
#ifdef H5_HAVE_PARALLEL
         ||
         ( ( cache_ptr->aux_ptr != NULL )

Could become:

    if ( !cache_ptr
#ifdef H5_HAVE_PARALLEL
         ||
         ( ( cache_ptr->aux_ptr != NULL )