Skip to content

Commit 6cea97e

Browse files
committed
GPUJPEG_ASSERT: dismiss clang_tidy warning
ignored return code of fprintf
1 parent 4a1ebdf commit 6cea97e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/gpujpeg_common_internal.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,13 @@ enum {
106106
};
107107

108108
/// unconditional assert
109-
#define GPUJPEG_ASSERT(cond) do { if (!(cond)) { fprintf(stderr, "%s:%d: %s: Assertion `" #cond "' failed.\n", __FILE__, __LINE__, __func__); abort(); } } while(0)
109+
#define GPUJPEG_ASSERT(cond) \
110+
do { \
111+
if ( !(cond) ) { \
112+
(void)fprintf(stderr, "%s:%d: %s: Assertion `" #cond "' failed.\n", __FILE__, __LINE__, __func__); \
113+
abort(); \
114+
} \
115+
} while ( 0 )
110116

111117
#define ERROR_MSG(...) (void)fprintf(stderr, "[GPUJPEG] [Error] " __VA_ARGS__)
112118
#define WARN_MSG(...) (void)fprintf(stderr, "[GPUJPEG] [Warning] " __VA_ARGS__)

0 commit comments

Comments
 (0)