[Openmp-dev] unused variable 'temp_val'
Jack Howarth
howarth.mailing.lists at gmail.com
Wed Jun 3 10:00:20 PDT 2015
Jonathan,
It appears we have one more instance of dead code in
runtime/src/kmp_atomic.c which produces numerous 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:2266:1:
warning: unused variable 'temp_val' [-Wunused-variable]
ATOMIC_CMPXCHG_CPT_REV( fixed1, div_cpt_rev, kmp_int8, 8, /,
KMP_ARCH_X86 ) // __kmpc_atomic_fixed1_div_cpt_rev
^
/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_atomic.c:2260:34:
note: expanded from macro 'ATOMIC_CMPXCHG_CPT_REV'
TYPE KMP_ATOMIC_VOLATILE temp_val; \
^
Isn't the line...
TYPE KMP_ATOMIC_VOLATILE temp_val; \
dead code in the macro definition....
#define ATOMIC_CMPXCHG_CPT_REV(TYPE_ID,OP_ID,TYPE,BITS,OP,GOMP_FLAG) \
ATOMIC_BEGIN_CPT(TYPE_ID,OP_ID,TYPE,TYPE) \
TYPE new_value; \
TYPE KMP_ATOMIC_VOLATILE temp_val; \
OP_GOMP_CRITICAL_CPT_REV(OP,GOMP_FLAG) \
OP_CMPXCHG_CPT_REV(TYPE,BITS,OP) \
}
Jack
More information about the Openmp-dev
mailing list