Skip to content

Commit 023ef0f

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

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++) {

sds.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,8 @@ int sdsTest(int argc, char *argv[]);
272272
#endif
273273

274274
#endif
275+
276+
/* GCC: Incorrect warning about empty translation units
277+
* when using pre-compiled headers,
278+
* (See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64502). */
279+
typedef int sdsvoid;

0 commit comments

Comments
 (0)