Skip to content

Commit 1482ec9

Browse files
Merge pull request #474 from mroi/patch-1
[SR-10559] libdispatch fails to build with _FORTIFY_SOURCE=2
2 parents 2e3d5c0 + 31d31fe commit 1482ec9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,14 +1046,14 @@ _dispatch_ktrace_impl(uint32_t code, uint64_t a, uint64_t b,
10461046
dispatch_assert(_length != -1); \
10471047
_msg = (char *)malloc((unsigned)_length + 1); \
10481048
dispatch_assert(_msg); \
1049-
snprintf(_msg, (unsigned)_length + 1, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, ##__VA_ARGS__); \
1049+
(void)snprintf(_msg, (unsigned)_length + 1, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, ##__VA_ARGS__); \
10501050
_dispatch_assert_crash(_msg); \
10511051
free(_msg); \
10521052
} while (0)
10531053
#else
10541054
#define _dispatch_client_assert_fail(fmt, ...) do { \
10551055
char *_msg = NULL; \
1056-
asprintf(&_msg, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, \
1056+
(void)asprintf(&_msg, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, \
10571057
##__VA_ARGS__); \
10581058
_dispatch_assert_crash(_msg); \
10591059
free(_msg); \

0 commit comments

Comments
 (0)