-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix -Werror=type-limits. #15635
Fix -Werror=type-limits. #15635
Conversation
I'm not sure how to enforce |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -221,7 +221,7 @@ int32_t bz2_decompress_block(unbz_state_s* s) | |||
if (getbits(s, 1)) return BZ_DATA_ERROR; // blockRandomized not supported (old bzip versions) | |||
|
|||
s->origPtr = getbits(s, 24); | |||
if (s->origPtr < 0 || s->origPtr > 10 + 100000 * s->blockSize100k) return BZ_DATA_ERROR; | |||
if (s->origPtr > 10 + 100000 * s->blockSize100k) return BZ_DATA_ERROR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 One wonders how we got here in the first place.
/merge |
Maybe I'm misunderstanding the problem, but could we just add this flag to our builds? We can add flags like this here. |
Description
I'm compiling cuDF as a part of another application and ran into errors from
-Werror=type-limits
. There are a few comparisons between unsigned types likevalue < 0
, which is never true. This PR removes those impossible code paths.Checklist