Author: Martin Storsjö Date: 2022-08-09T13:29:27+02:00 New Revision: 482e2dc26e6cc1f0ebc81966948bd6ce2aa05b1d
URL: https://github.com/llvm/llvm-project/commit/482e2dc26e6cc1f0ebc81966948bd6ce2aa05b1d DIFF: https://github.com/llvm/llvm-project/commit/482e2dc26e6cc1f0ebc81966948bd6ce2aa05b1d.diff LOG: [OpenMP] Fix warnings about unused expressions when OMPT_LOOP_DISPATCH 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); ^~~~~~ (cherry picked from commit 3f25ad335b4ef882cd4e336f9d9ac1606220f572) Added: Modified: openmp/runtime/src/kmp_dispatch.cpp Removed: ################################################################################ diff --git a/openmp/runtime/src/kmp_dispatch.cpp b/openmp/runtime/src/kmp_dispatch.cpp index e7d28c6587b15..c8c8ff8065fc8 100644 --- a/openmp/runtime/src/kmp_dispatch.cpp +++ b/openmp/runtime/src/kmp_dispatch.cpp @@ -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 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits