Skip to content

Commit 4fc6fdc

Browse files
mroirokhinip
authored andcommitted
explicitly ignore return value
fixes compilation with _FORTIFY_SOURCE=2, which would otherwise fail with -Werror and -Wunused Signed-off-by: Kim Topley <[email protected]>
1 parent d9b009f commit 4fc6fdc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,14 +1074,14 @@ _dispatch_ktrace_impl(uint32_t code, uint64_t a, uint64_t b,
10741074
dispatch_assert(_length != -1); \
10751075
_msg = (char *)malloc((unsigned)_length + 1); \
10761076
dispatch_assert(_msg); \
1077-
snprintf(_msg, (unsigned)_length + 1, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, ##__VA_ARGS__); \
1077+
(void)snprintf(_msg, (unsigned)_length + 1, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, ##__VA_ARGS__); \
10781078
_dispatch_assert_crash(_msg); \
10791079
free(_msg); \
10801080
} while (0)
10811081
#else
10821082
#define _dispatch_client_assert_fail(fmt, ...) do { \
10831083
char *_msg = NULL; \
1084-
asprintf(&_msg, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, \
1084+
(void)asprintf(&_msg, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, \
10851085
##__VA_ARGS__); \
10861086
_dispatch_assert_crash(_msg); \
10871087
free(_msg); \
File renamed without changes.

0 commit comments

Comments
 (0)