Skip to content

Commit 0cf0c95

Browse files
committed
Fix pedantic warnings for gcc
Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64502
1 parent cb4e94a commit 0cf0c95

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

sds.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,7 @@ int sdsTest(void) {
12661266
if (type != SDS_TYPE_5) {
12671267
test_cond("sdsMakeRoomFor() free", sdsavail(x) >= step);
12681268
oldfree = sdsavail(x);
1269+
(void) oldfree;
12691270
}
12701271
p = x+oldlen;
12711272
for (j = 0; j < step; j++) {

sdsalloc.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@
4040
#define s_malloc malloc
4141
#define s_realloc realloc
4242
#define s_free free
43+
44+
/* GCC: Incorrect warning about empty translation units
45+
* when using pre-compiled headers,
46+
* (See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64502). */
47+
typedef int sdsvoid;

0 commit comments

Comments
 (0)