[Openmp-dev] unused variables

Peyton, Jonathan L jonathan.l.peyton at intel.com
Wed Jun 3 12:54:51 PDT 2015


Jack,

Can you send me (maybe as attachment) a log of a build so I can sift through all the unused variable warnings.
I'm guessing the ones below aren't all of them.

-- Johnny

-----Original Message-----
From: Jack Howarth [mailto:howarth.mailing.lists at gmail.com] 
Sent: Wednesday, June 3, 2015 2:44 PM
To: Peyton, Jonathan L; openmp-dev at dcs-maillist2.engr.illinois.edu
Subject: unused variables

Jonathan,
      It might be worth weeding through the unused variable warnings which seem to be a combination of dead code and declarations that should be protected by additional preprocessor statements. For an example of dead code, the following warnings seem to point to some instances....

/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_gsupport.c:189:11:
warning: unused variable 'loc' [-Wunused-variable]
    MKLOC(loc, "GOMP_single_copy_end");
          ^
/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_gsupport.c:31:21:
note: expanded from macro 'MKLOC'
    static ident_t (loc) = {0, KMP_IDENT_KMPC, 0, 0, ";unknown;unknown;0;0;;" };
                    ^

/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_gsupport.c:853:1:
warning: unused variable 'last' [-Wunused-variable] PARALLEL_LOOP_START(xexpand(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC_START),
kmp_sch_static)
^
/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_gsupport.c:827:13:
note: expanded from macro 'PARALLEL_LOOP_START'
        int last = FALSE;                                                    \
            ^

/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_gsupport.c:1182:1:
warning: unused variable 'last' [-Wunused-variable] PARALLEL_LOOP(xexpand(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC), kmp_sch_static) ^
/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_gsupport.c:1152:13:
note: expanded from macro 'PARALLEL_LOOP'
        int last = FALSE;                                                    \
            ^

           Jack




More information about the Openmp-dev mailing list