summary refs log tree commit diff
path: root/pkgs/development/compilers/swift/patches/libdispatch-fortify-fix.patch
blob: d23a308d68f4f84d0a82a3d86499fe7a6608168b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
Nix compiles with _FORTIFY_SOURCE enabled. Fix error due to -Werror and an unused return value warning.

--- swift-corelibs-libdispatch/src/internal.h	2019-04-26 09:33:38.287289099 +0200
+++ swift-corelibs-libdispatch/src/internal.h	2019-04-26 15:31:10.485334128 +0200
@@ -1053,7 +1053,7 @@
 #else
 #define _dispatch_client_assert_fail(fmt, ...)  do { \
 		char *_msg = NULL; \
-		asprintf(&_msg, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, \
+		(void)asprintf(&_msg, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, \
 				##__VA_ARGS__); \
 		_dispatch_assert_crash(_msg); \
 		free(_msg); \