Skip to content

Commit a346a30

Browse files
authored
Merge pull request #855 from veselypeta/petr/fix-empty-body-warning
[UMF] Fix -Wempty-body warning
2 parents 8b3da24 + 739d11c commit a346a30

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmake/helpers.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function(add_ur_target_compile_options name)
6363
-fPIC
6464
-Wall
6565
-Wpedantic
66+
-Wempty-body
6667
$<$<CXX_COMPILER_ID:GNU>:-fdiagnostics-color=always>
6768
$<$<CXX_COMPILER_ID:Clang,AppleClang>:-fcolor-diagnostics>
6869
)

source/common/unified_malloc_framework/src/utils/utils.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ static inline void *Zalloc(size_t s) {
7373
}
7474

7575
#define NOFUNCTION \
76-
do \
77-
; \
78-
while (0)
76+
do { \
77+
} while (0)
7978
#define VALGRIND_ANNOTATE_NEW_MEMORY(p, s) NOFUNCTION
8079
#define VALGRIND_HG_DRD_DISABLE_CHECKING(p, s) NOFUNCTION
8180

0 commit comments

Comments
 (0)