Skip to content

Commit

Permalink
[OpenMP] Fix warnings about unused expressions when OMPT_LOOP_DISPATC…
Browse files Browse the repository at this point in the history
…H is a no-op. NFC.

This fixes warnings like these:

../runtime/src/kmp_dispatch.cpp:2159:24: warning: left operand of comma operator has no effect [-Wunused-value]
    OMPT_LOOP_DISPATCH(*p_lb, *p_ub, pr->u.p.st, status);
                       ^~~~~
../runtime/src/kmp_dispatch.cpp:2159:31: warning: left operand of comma operator has no effect [-Wunused-value]
    OMPT_LOOP_DISPATCH(*p_lb, *p_ub, pr->u.p.st, status);
                              ^~~~~
../runtime/src/kmp_dispatch.cpp:2159:46: warning: left operand of comma operator has no effect [-Wunused-value]
    OMPT_LOOP_DISPATCH(*p_lb, *p_ub, pr->u.p.st, status);
                                     ~~~~~~~ ^~
../runtime/src/kmp_dispatch.cpp:2159:50: warning: expression result unused [-Wunused-value]
    OMPT_LOOP_DISPATCH(*p_lb, *p_ub, pr->u.p.st, status);
                                                 ^~~~~~
  • Loading branch information
mstorsjo committed Aug 2, 2022
1 parent e0a3964 commit 3f25ad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmp/runtime/src/kmp_dispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ int __kmp_dispatch_next_algorithm(int gtid,
// TODO: implement count
#else
#define OMPT_LOOP_END // no-op
#define OMPT_LOOP_DISPATCH // no-op
#define OMPT_LOOP_DISPATCH(lb, ub, st, status) // no-op
#endif

#if KMP_STATS_ENABLED
Expand Down

0 comments on commit 3f25ad3

Please sign in to comment.