Skip to content

Commit 746e027

Browse files
authored
Use (void) to silence the unused variable warning for reqlen to solve this problem at the lowest cost.
1 parent 4a293c8 commit 746e027

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/shell/sds/sds.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ sds sdsMakeRoomFor(sds s, size_t addlen) {
222222

223223
hdrlen = sdsHdrSize(type);
224224
assert(hdrlen + newlen + 1 > reqlen); /* Catch size_t overflow */
225+
(void)reqlen;
225226
if (oldtype==type) {
226227
newsh = s_realloc(sh, hdrlen+newlen+1);
227228
if (newsh == NULL) return NULL;

0 commit comments

Comments
 (0)