Skip to content

Commit

Permalink
Fix pedantic warnings for gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
oxr463 committed May 12, 2020
1 parent cb4e94a commit 023ef0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions sds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
5 changes: 5 additions & 0 deletions sds.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,8 @@ int sdsTest(int argc, char *argv[]);
#endif

#endif

/* 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;

0 comments on commit 023ef0f

Please sign in to comment.