diff options
Diffstat (limited to 'testing/libsds/01-gcc-pedantic.patch')
-rw-r--r-- | testing/libsds/01-gcc-pedantic.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/libsds/01-gcc-pedantic.patch b/testing/libsds/01-gcc-pedantic.patch new file mode 100644 index 00000000000..4b6d51e467f --- /dev/null +++ b/testing/libsds/01-gcc-pedantic.patch @@ -0,0 +1,36 @@ +From 0cf0c952c60d5857450ca03c4736ea2f3c645046 Mon Sep 17 00:00:00 2001 +From: rage <oxr463@gmx.us> +Date: Mon, 6 May 2019 14:24:29 -0400 +Subject: [PATCH] Fix pedantic warnings for gcc + +Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64502 +--- + sds.c | 1 + + sdsalloc.h | 5 +++++ + 2 files changed, 6 insertions(+) + +diff --git a/sds.c b/sds.c +index 39ad595..2ef0ae7 100644 +--- a/sds.c ++++ b/sds.c +@@ -1266,6 +1266,7 @@ int sdsTest(void) { + if (type != SDS_TYPE_5) { + test_cond("sdsMakeRoomFor() free", sdsavail(x) >= step); + oldfree = sdsavail(x); ++ (void) oldfree; + } + p = x+oldlen; + for (j = 0; j < step; j++) { +diff --git a/sdsalloc.h b/sdsalloc.h +index f43023c..0367e21 100644 +--- a/sdsalloc.h ++++ b/sdsalloc.h +@@ -40,3 +40,8 @@ + #define s_malloc malloc + #define s_realloc realloc + #define s_free free ++ ++/* GCC: Incorrect warning about empty translation units ++ * when using pre-compiled headers, ++ * (See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64502). */ ++typedef int sdsvoid; |