diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2019-01-17 11:07:51 -0800 |
---|---|---|
committer | Pirama Arumuga Nainar <pirama@google.com> | 2019-01-17 11:13:12 -0800 |
commit | c3dd9e5e066667cc8f645aedca79212b8860d46d (patch) | |
tree | c864ee4d828656ce93b2714d32218f8f94172627 | |
parent | 33c601f0f325f31b89d106e5ebee37a68b2788f2 (diff) | |
download | dng_sdk-c3dd9e5e066667cc8f645aedca79212b8860d46d.tar.gz |
Fix occurrences of Wextra-semi-stmt
Bug: http://b/123023349
Upcoming clang update adds a new diagnostic about empty statements from
extraneous semicolons. Remove the semicolon at the end of DNG_ASSERT
since most uses of the macro treat it as a function call and add a
semicolon after the macro statement. Fix the one use of DNG_ASSERT that
wasn't using a macro.
Test: Build with new clang.
Change-Id: I7c53fe4d19441446e2c5b7871b4bf07dfffd154c
-rw-r--r-- | source/dng_assertions.h | 2 | ||||
-rw-r--r-- | source/dng_mosaic_info.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/dng_assertions.h b/source/dng_assertions.h index dc998fa..0377350 100644 --- a/source/dng_assertions.h +++ b/source/dng_assertions.h @@ -59,7 +59,7 @@ void dng_show_message_f (const char *fmt, ...); /// \param x Predicate which must be true. /// \param y String to display if x is not true. -#define DNG_ASSERT(x,y) +#define DNG_ASSERT(x,y) do { } while(false) #endif #endif diff --git a/source/dng_mosaic_info.cpp b/source/dng_mosaic_info.cpp index 0a51d9b..dde2e31 100644 --- a/source/dng_mosaic_info.cpp +++ b/source/dng_mosaic_info.cpp @@ -104,7 +104,7 @@ void dng_bilinear_kernel::Add (const dng_point &delta, // Add element to list. - DNG_ASSERT (fCount < kMaxCount, "Too many kernel entries") + DNG_ASSERT (fCount < kMaxCount, "Too many kernel entries"); fDelta [fCount] = delta; fWeight32 [fCount] = weight; |