[Openmp-dev] unused variable 'anonym' [-Wunused-variable]

Jack Howarth howarth.mailing.lists at gmail.com
Tue Jun 2 17:08:13 PDT 2015


Jonathan,
      I see a number of warnings of the form....

/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_atomic.c:1128:1:
warning: unused variable 'anonym' [-Wunused-variable]
ATOMIC_CMPXCHG_WORKAROUND( cmplx4, add, kmp_cmplx32, 64, +, 8c, 7, 1 )
  // __kmpc_atomic_cmplx4_add
^
/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_atomic.c:772:5:
note: expanded from macro 'ATOMIC_CMPXCHG_WORKAROUND'
    OP_CMPXCHG_WORKAROUND(TYPE,BITS,OP)
               \
    ^
/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_atomic.c:727:7:
note: expanded from macro 'OP_CMPXCHG_WORKAROUND'
        char anonym[ ( sizeof( TYPE ) == sizeof( kmp_int##BITS ) ) ? (
1 ) : ( 0 ) ] = { 1 }; \
             ^

Isn't the line....

        char anonym[ ( sizeof( TYPE ) == sizeof( kmp_int##BITS ) ) ? (
1 ) : ( 0 ) ] = { 1 }; \

in the OP_CMPXCHG_WORKAROUND(TYPE,BITS,OP) macro dead code?
          Jack



More information about the Openmp-dev mailing list