empiredan commented on code in PR #2253:
URL: 
https://github.com/apache/incubator-pegasus/pull/2253#discussion_r2101611397


##########
src/shell/sds/sds.c:
##########
@@ -220,6 +221,7 @@ sds sdsMakeRoomFor(sds s, size_t addlen) {
     if (type == SDS_TYPE_5) type = SDS_TYPE_8;
 
     hdrlen = sdsHdrSize(type);
+    assert(hdrlen + newlen + 1 > reqlen);  /* Catch size_t overflow */

Review Comment:
   [As suggested in the 
comment](https://github.com/apache/incubator-pegasus/pull/2253#issuecomment-2899873989),
 use `(void)` to silence the warning about the unused variable `reqlen`.
   
   ```suggestion
       assert(hdrlen + newlen + 1 > reqlen);  /* Catch size_t overflow */
       (void)reqlen;
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pegasus.apache.org
For additional commands, e-mail: dev-h...@pegasus.apache.org

Reply via email to