mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-16 12:45:18 +03:00
https://github.com/antirez/sds Simple Dynamic Strings library for C Bug: https://gitlab.alpinelinux.org/alpine/aports/-/issues/11520
36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
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;
|