Skip to content

Commit

Permalink
squashme: attempt fixing urlnum warning
Browse files Browse the repository at this point in the history
/Users/runner/work/curl/curl/src/tool_writeout.c: In function 'writeLong':
/Users/runner/work/curl/curl/src/tool_writeout.c:244:37: error: comparison is always true due to limited range of data type [-Werror=type-limits]
       if((unsigned long)per->urlnum <= LONG_MAX) {
                                     ^~
  • Loading branch information
jay committed Feb 1, 2021
1 parent b042dfd commit 7e44a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tool_writeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ static int writeLong(FILE *stream, const struct writeoutvar *wovar,
valid = true;
break;
case VAR_URLNUM:
if((unsigned long)per->urlnum <= LONG_MAX) {
if((unsigned long)per->urlnum <= (unsigned long)LONG_MAX) {
longinfo = (long)per->urlnum;
valid = true;
}
Expand Down

0 comments on commit 7e44a9c

Please sign in to comment.