Skip to content
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

lib: silence -Wsign-conversion, tidy-ups, fixes #13481

Closed
wants to merge 77 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Apr 25, 2024

lib building without signedness warnings after this PR.

Also:

  • mingw declares sin_family/sin6_family as short.
  • fix assert in Curl_hash_add.

Cherry-picked from #13489
Follow-up to 3829759 #12489
Closes #13481

lib/altsvc.c Outdated Show resolved Hide resolved
@@ -409,7 +409,7 @@ static CURLcode getalnum(const char **ptr, char *alpnbuf, size_t buflen)
protop = p;
while(*p && !ISBLANK(*p) && (*p != ';') && (*p != '='))
p++;
len = p - protop;
len = (size_t)(p - protop);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this kind of typecast is perhaps the biggest sign that we should not use this warning option. The diff between two char * should be possible to store in a size_t without a typecast.

Or put another way: do these typecasts really help? They will make writing new code a little more awkward.

Copy link
Member Author

@vszakats vszakats Apr 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It pinpoints all the places where the result might be negative,
but the code assumes positive. For the strchr() pattern and manual
versions of it, this isn't really useful, but may be in the rest.

I assumed that all existing code is correct, but this isn't readily obvious
while reviewing the 442 cases.

A cast adds a signal that sign conversions were consious decisions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It pinpoints all the places where the result might be negative, but the code assumes positive

The code does not assume this, it knows. The logic is quite easy to follow.

In this and similar cases, this typecast does not add anything at all to a reader. In fact, it is mostly confusing to me since a pointer-delta should already be possible to store in a `size_t' just fine. Should it not?

Have you detected and corrected any actual errors with this exercise?

Copy link
Member Author

@vszakats vszakats Apr 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some, that were obvious and low-hanging, yes.

But, I try not to touch the actual logic, first because it'd take a very long time to explore each rabbit hole, and second it'd make the patch confusing IMO. Also, it's highly likely the code is correct unless proven otherwise.

What I find that it's difficult to deduct from local contexts that the code is handling the implicit sign conversions conciously.

Am I mistaken that e.g. a 100 - 1000 pointer delta would result in an underflow and make the result a very high number when handled as an unsigned size_t?

The other thing driving this is that this is one the few warnings actually recommended by OpenSSF. Assuming they know what they are saying, this might actually be useful, though of course there is nothing saying we must follow their recommendations.

@vszakats
Copy link
Member Author

vszakats commented Apr 27, 2024

Complete list of warnings addressed in #13469 #13470 #13472 and #13481 (this one):

log

altsvc.c:192:18: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
altsvc.c:412:9: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
altsvc.c:465:25: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
altsvc.c:549:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
altsvc.c:627:24: warning: conversion to ‘time_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
altsvc.c:699:18: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
base64.c:246:13: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
bufq.c:112:21: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
bufq.c:408:14: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
bufq.c:408:17: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
bufq.c:441:13: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
bufq.c:441:16: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
bufq.c:585:14: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
bufq.c:585:17: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
bufq.c:659:11: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
bufq.c:659:14: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
cf-https-connect.c:150:37: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
cf-https-connect.c:151:37: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
cf-socket.c:1302:15: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
cfilters.c:704:8: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
content_encoding.c:494:53: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
content_encoding.c:497:36: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
content_encoding.c:990:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
cookie.c:1090:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
cookie.c:1649:47: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
cookie.c:239:42: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
cookie.c:241:13: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
cookie.c:266:7: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
cookie.c:823:47: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
cookie.c:825:26: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
curl_ntlm_core.c:140:12: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
curl_ntlm_core.c:141:12: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
curl_ntlm_core.c:142:12: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
curl_ntlm_core.c:143:12: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
curl_ntlm_core.c:144:12: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
curl_ntlm_core.c:145:12: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
curl_ntlm_core.c:146:12: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
curl_ntlm_core.c:147:12: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
curl_printf.h:49:20: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
curl_trc.c:104:44: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
curl_trc.c:124:43: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
curl_trc.c:127:43: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
curl_trc.c:150:46: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
curl_trc.c:153:46: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
curl_trc.c:156:46: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
curl_trc.c:158:45: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
curl_trc.c:162:45: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
doh.c:147:18: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
doh.c:174:11: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
doh.c:609:15: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
doh.c:673:35: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
doh.c:743:26: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
doh.c:753:27: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
doh.c:761:25: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
doh.c:769:30: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
doh.c:774:45: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
doh.c:795:30: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
doh.c:817:30: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
dynhds.c:254:15: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
easy.c:582:29: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
escape.c:140:24: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
escape.c:160:13: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
escape.c:166:13: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
escape.c:225:16: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
escape.c:226:16: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
escape.c:73:24: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
file.c:373:33: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
file.c:373:36: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
file.c:393:15: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
file.c:393:18: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
file.c:473:68: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
file.c:499:66: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
file.c:590:68: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
formdata.c:321:9: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
formdata.c:845:48: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
formdata.c:872:48: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
formdata.c:899:73: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ftp.c:1067:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ftp.c:1082:21: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ftp.c:1553:18: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ftp.c:1715:16: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
ftp.c:1715:19: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
ftp.c:2265:55: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
ftp.c:2476:49: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
ftp.c:3088:38: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ftp.c:311:17: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ftp.c:4295:25: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ftp.c:4339:28: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ftp.c:825:13: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
ftp.c:825:16: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
getinfo.c:207:25: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
getinfo.c:219:25: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
getinfo.c:364:25: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
getinfo.c:453:25: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
gopher.c:190:40: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
gopher.c:196:12: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
gopher.c:196:9: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
hash.c:115:32: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
hash.c:282:7: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
hash.c:376:21: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
hash.c:94:57: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
headers.c:234:12: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
headers.c:298:10: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
hostip.c:1142:16: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
hostip.c:1190:14: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
hostip.c:1220:16: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
hostip.c:179:8: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
hostip.c:418:29: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
hostip.c:422:41: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
hostip.c:436:37: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
hostip.c:437:26: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
http.c:1129:9: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http.c:1319:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http.c:1342:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http.c:261:9: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http.c:3873:16: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http1.c:152:11: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http1.c:162:20: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http1.c:232:50: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
http1.c:280:11: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
http1.c:280:14: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
http1.c:97:22: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http_aws_sigv4.c:445:17: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http_aws_sigv4.c:459:20: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
http_aws_sigv4.c:608:11: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http_aws_sigv4.c:627:13: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
http_chunks.c:225:20: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
http_chunks.c:225:23: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
http_chunks.c:348:24: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
http_chunks.c:592:51: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
http_digest.c:150:23: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
if2ip.c:165:28: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
imap.c:1200:57: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
imap.c:1918:59: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
imap.c:1973:40: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
imap.c:1996:40: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
imap.c:2007:40: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
imap.c:779:30: warning: unsigned conversion from ‘int’ to ‘unsigned int’ changes value from ‘-3’ to ‘4294967293’ [-Wsign-conversion]
lib1537.c:61:25: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
lib1537.c:73:25: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
lib1597.c:91:53: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
lib530.c:67:37: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
lib530.c:95:74: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
lib571.c:83:50: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
lib582.c:60:37: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
lib677.c:103:58: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
lib677.c:111:15: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
lib677.c:111:18: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
lib677.c:119:17: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
lib677.c:85:62: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
lib677.c:93:15: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
lib677.c:93:18: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
mime.c:1140:15: warning: unsigned conversion from ‘int’ to ‘unsigned int’ changes value from ‘-5’ to ‘4294967291’ [-Wsign-conversion]
mime.c:1391:22: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
mime.c:1501:17: warning: unsigned conversion from ‘int’ to ‘unsigned int’ changes value from ‘-2’ to ‘4294967294’ [-Wsign-conversion]
mime.c:1665:10: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
mime.c:1665:13: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
mime.c:1666:10: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
mime.c:1666:13: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
mime.c:2009:19: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
mime.c:2009:22: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
mime.c:785:17: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
mime.c:785:20: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
mime.c:846:24: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
mime.c:846:27: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
mprintf.c:1010:17: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
mprintf.c:1042:24: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
mprintf.c:1142:14: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
mprintf.c:246:16: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
mprintf.c:264:15: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
mprintf.c:294:17: warning: unsigned conversion from ‘int’ to ‘unsigned int’ changes value from ‘-257’ to ‘4294967039’ [-Wsign-conversion]
mprintf.c:552:21: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
mprintf.c:565:12: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
mprintf.c:691:17: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
mprintf.c:696:17: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
mprintf.c:750:17: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
mprintf.c:851:17: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
mprintf.c:894:17: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
mprintf.c:924:19: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
mprintf.c:960:14: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mprintf.c:968:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqtt.c:165:14: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
mqtt.c:176:33: warning: conversion to ‘size_t’ {aka ‘const long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqtt.c:195:33: warning: conversion to ‘size_t’ {aka ‘const long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqtt.c:227:30: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqtt.c:287:31: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqtt.c:303:64: warning: conversion to ‘size_t’ {aka ‘const long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqtt.c:312:16: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqtt.c:455:7: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqtt.c:541:15: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqtt.c:670:36: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
mqtt.c:672:22: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
mqtt.c:695:64: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
mqtt.c:699:17: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
mqttd.c:199:21: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqttd.c:225:21: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqttd.c:399:29: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
mqttd.c:415:32: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
mqttd.c:419:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
mqttd.c:424:33: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqttd.c:433:31: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
mqttd.c:444:41: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
mqttd.c:485:50: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
multi.c:1478:22: warning: conversion to ‘unsigned int’ from ‘short int’ may change the sign of the result [-Wsign-conversion]
multi.c:1505:32: warning: conversion to ‘short int’ from ‘short unsigned int’ may change the sign of the result [-Wsign-conversion]
multi.c:2779:22: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
multi.c:3000:21: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
multi.c:3285:22: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
multi.c:346:14: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘curl_socket_t’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
multi.c:3590:15: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
multi.c:3590:18: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
multi.c:3704:46: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
multi.c:3709:47: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
noproxy.c:155:17: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
noproxy.c:235:20: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
noproxy.c:90:11: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
noproxy.c:98:38: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
pingpong.c:318:50: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
pingpong.c:324:20: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
pingpong.c:333:23: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
pop3.c:1382:59: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
pop3.c:1384:56: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
pop3.c:672:32: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
pop3.c:675:29: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
rand.c:283:39: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
rand.c:285:14: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
rand.c:285:22: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
request.c:219:32: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
request.c:219:35: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
rtsp.c:319:15: warning: unsigned conversion from ‘int’ to ‘unsigned int’ changes value from ‘-8’ to ‘4294967288’ [-Wsign-conversion]
rtsp.c:959:13: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:362:51: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:380:41: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:384:65: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:387:35: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:388:39: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:453:37: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:489:22: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:566:43: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:578:37: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:590:31: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
rtspd.c:92:41: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
rtspd.c:94:41: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
rtspd.c:957:11: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
rtspd.c:95:41: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
rtspd.c:975:13: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
select.c:229:22: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
sendf.c:312:23: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sendf.c:312:26: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
sendf.c:713:19: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sendf.c:713:22: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
sendf.c:782:14: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sendf.c:782:17: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
setopt.c:945:11: warning: conversion to ‘long int’ from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
smb.c:508:13: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
smb.c:562:9: warning: conversion to ‘unsigned int’ from ‘__pid_t’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
smb.c:674:16: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
smb.c:702:16: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
smtp.c:1650:59: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
smtp.c:698:30: warning: unsigned conversion from ‘int’ to ‘unsigned int’ changes value from ‘-3’ to ‘4294967293’ [-Wsign-conversion]
sockfilt.c:1107:32: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sockfilt.c:1182:32: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sockfilt.c:238:63: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sockfilt.c:284:31: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sockfilt.c:362:23: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
sockfilt.c:368:23: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
sockfilt.c:374:23: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
sockfilt.c:414:26: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
socks.c:1033:13: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
socks.c:1054:27: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
socks.c:220:34: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
socks.c:251:31: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
socks.c:450:25: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
socks.c:632:23: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
socks.c:759:23: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
socks.c:954:23: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
socksd.c:255:21: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
socksd.c:662:22: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
socksd.c:675:22: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
strcase.c:74:20: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
strcase.c:82:20: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
sws.c:1193:11: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sws.c:1591:39: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sws.c:1603:58: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sws.c:1609:38: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sws.c:1621:58: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sws.c:1639:49: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sws.c:1641:70: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sws.c:1659:49: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sws.c:1661:70: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
sws.c:2290:31: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
sws.c:406:17: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
sws.c:519:27: warning: conversion to ‘long int’ from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
sws.c:645:24: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
sws.c:758:43: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
sws.c:778:31: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
sws.c:898:23: warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
telnet.c:1047:29: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
telnet.c:1085:34: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
telnet.c:1248:31: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘ssize_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
telnet.c:1547:27: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
telnet.c:826:14: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
telnet.c:945:71: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
telnet.c:983:17: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
telnet.c:986:27: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
telnet.c:987:17: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:1113:48: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:1140:49: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:1151:21: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:324:42: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tftp.c:471:43: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:478:20: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:741:29: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:777:62: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:786:23: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:812:25: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:991:54: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftp.c:998:54: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftpd.c:1183:22: warning: conversion to ‘short int’ from ‘__uint16_t’ {aka ‘short unsigned int’} may change the sign of the result [-Wsign-conversion]
tftpd.c:1218:24: warning: conversion to ‘short int’ from ‘__uint16_t’ {aka ‘short unsigned int’} may change the sign of the result [-Wsign-conversion]
tftpd.c:1261:22: warning: conversion to ‘short int’ from ‘__uint16_t’ {aka ‘short unsigned int’} may change the sign of the result [-Wsign-conversion]
tftpd.c:1290:24: warning: conversion to ‘short int’ from ‘__uint16_t’ {aka ‘short unsigned int’} may change the sign of the result [-Wsign-conversion]
tftpd.c:1321:20: warning: conversion to ‘short int’ from ‘__uint16_t’ {aka ‘short unsigned int’} may change the sign of the result [-Wsign-conversion]
tftpd.c:1361:19: warning: conversion to ‘short int’ from ‘__uint16_t’ {aka ‘short unsigned int’} may change the sign of the result [-Wsign-conversion]
tftpd.c:1374:40: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftpd.c:477:41: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tftpd.c:823:21: warning: conversion to ‘short int’ from ‘__uint16_t’ {aka ‘short unsigned int’} may change the sign of the result [-Wsign-conversion]
tftpd.c:823:29: warning: conversion to ‘__uint16_t’ {aka ‘short unsigned int’} from ‘short int’ may change the sign of the result [-Wsign-conversion]
timeval.c:110:20: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
timeval.c:121:20: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
timeval.c:98:20: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_cb_hdr.c:135:32: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_cb_hdr.c:193:15: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_cb_hdr.c:253:24: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:101:37: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:101:9: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:208:23: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:278:15: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:296:10: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:89:23: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:95:30: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:95:9: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:97:36: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:97:9: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:99:37: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_cb_prg.c:99:9: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_cb_wrt.c:356:17: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
tool_cb_wrt.c:356:20: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_getparam.c:1021:27: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
tool_getparam.c:863:12: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_getparam.c:868:12: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘char’ may change the sign of the result [-Wsign-conversion]
tool_getpass.c:149:20: warning: unsigned conversion from ‘int’ to ‘tcflag_t’ {aka ‘unsigned int’} changes value from ‘-9’ to ‘4294967287’ [-Wsign-conversion]
tool_help.c:102:14: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_help.c:104:17: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_help.c:104:28: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_hugehelp.c:10732:50: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_libinfo.c:160:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_operate.c:978:23: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
tool_paramhlp.c:322:12: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_paramhlp.c:88:18: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_setopt.c:226:11: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
tool_setopt.c:245:46: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_setopt.c:262:46: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_setopt.c:705:17: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]
tool_urlglob.c:232:11: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_urlglob.c:310:11: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_urlglob.c:320:65: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_urlglob.c:321:35: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_urlglob.c:322:34: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
tool_urlglob.c:353:10: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_writeout.c:549:18: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_writeout.c:599:20: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_writeout.c:622:27: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
tool_writeout_json.c:75:18: warning: conversion to ‘char’ from ‘unsigned char’ may change the sign of the result [-Wsign-conversion]
transfer.c:1247:29: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
transfer.c:1247:32: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
transfer.c:278:20: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
transfer.c:278:23: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
unit1303.c:147:14: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
unit1303.c:147:33: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
unit1309.c:123:28: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
unit1309.c:90:18: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
unit1396.c:109:52: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
unit1396.c:94:52: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
unit1652.c:92:32: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
unit3200.c:93:25: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
url.c:1653:9: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
urlapi.c:1115:24: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
urlapi.c:1198:22: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
urlapi.c:1245:23: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
urlapi.c:1272:15: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
urlapi.c:235:18: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
urlapi.c:469:55: warning: conversion to ‘size_t’ {aka ‘const long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
urlapi.c:499:13: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
urlapi.c:541:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
var.c:225:54: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
var.c:253:37: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
var.c:255:16: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
var.c:257:16: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
var.c:261:55: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
var.c:267:58: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
var.c:282:46: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
var.c:301:27: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
var.c:400:10: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
vauth/ntlm.c:511:14: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
vauth/ntlm.c:588:17: warning: unsigned conversion from ‘int’ to ‘unsigned int’ changes value from ‘-524289’ to ‘4294443007’ [-Wsign-conversion]
vauth/ntlm.c:603:22: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/hostcheck.c:115:25: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
vtls/hostcheck.c:116:24: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:1941:20: warning: conversion to ‘long int’ from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:1944:38: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:2314:46: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:2316:59: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:2344:34: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:323:55: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:3652:15: warning: unsigned conversion from ‘int’ to ‘ctx_option_t’ {aka ‘long unsigned int’} changes value from ‘-1’ to ‘18446744073709551615’ [-Wsign-conversion]
vtls/openssl.c:3697:53: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:4036:48: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:4427:27: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:4445:62: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:732:53: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:758:50: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/openssl.c:971:39: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/vtls.c:1413:31: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
vtls/vtls.c:1418:20: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
vtls/vtls.c:1981:30: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
vtls/vtls.c:940:15: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
vtls/vtls.c:953:13: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ws-data.c:228:14: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ws-data.c:229:14: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
ws.c:105:26: warning: conversion to ‘unsigned char’ from ‘char’ may change the sign of the result [-Wsign-conversion]
ws.c:353:25: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
ws.c:353:55: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
ws.c:395:23: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
ws.c:395:36: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
ws.c:395:54: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
ws.c:563:30: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
ws.c:870:23: warning: conversion to ‘curl_off_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
ws.c:870:36: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
ws.c:870:54: warning: conversion to ‘long unsigned int’ from ‘curl_off_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
ws.c:906:10: warning: conversion to ‘ssize_t’ {aka ‘long int’} from ‘size_t’ {aka ‘long unsigned int’} may change the sign of the result [-Wsign-conversion]

@vszakats

This comment was marked as outdated.

vszakats added a commit to vszakats/curl that referenced this pull request Apr 27, 2024
vszakats added a commit to vszakats/curl that referenced this pull request Apr 29, 2024
@vszakats vszakats marked this pull request as draft April 29, 2024 15:18
@vszakats vszakats marked this pull request as ready for review April 29, 2024 16:50
@vszakats vszakats changed the title lib: silence -Wsign-conversion lib: silence -Wsign-conversion, tidy-ups, fixes Apr 29, 2024
```
altsvc.c: In function ‘altsvc_add’:
altsvc.c:192:18: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
  192 |       as->prio = prio;
      |                  ^~~~
altsvc.c: In function ‘getalnum’:
altsvc.c:412:9: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
  412 |   len = p - protop;
      |         ^
altsvc.c: In function ‘altsvc_debugtime’:
altsvc.c:465:25: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result [-Wsign-conversion]
  465 |     unsigned long val = strtol(timestr, NULL, 10);
      |                         ^~~~~~
altsvc.c: In function ‘Curl_altsvc_parse’:
altsvc.c:549:19: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘long int’ may change the sign of the result [-Wsign-conversion]
  549 |             len = p - hostp;
      |                   ^
altsvc.c:627:24: warning: conversion to ‘time_t’ {aka ‘long int’} from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion]
  627 |               maxage = num;
      |                        ^~~
altsvc.c: In function ‘Curl_altsvc_lookup’:
altsvc.c:699:18: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
  699 |        (versions & as->dst.alpnid)) {
      |                  ^
```
Ref: https://github.com/curl/curl/actions/runs/8819398779/job/24210519501#step:30:25
win32:
```
 177 |     vals.keepalivetime = optval;
      |                        ~ ^~~~~~
/home/runner/work/curl/curl/curl/lib/cf-socket.c:180:30: error: implicit conversion changes signedness: 'int' to 'u_long' (aka 'unsigned long') [-Werror,-Wsign-conversion]
  180 |     vals.keepaliveinterval = optval;
      |                            ~ ^~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/8862225447/job/24334941063?pr=13489#step:3:6125
Linux 32-bit gcc:
```
cookie.c: In function ‘cookie_hash_domain’:
cookie.c:266:7: error: conversion to ‘size_t’ {aka ‘unsigned int’} from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion]
  266 |     h ^= (size_t)Curl_raw_toupper(*domain++);
      |       ^~
```
Ref: https://github.com/curl/curl/actions/runs/8859933866/job/24330206389?pr=13489#step:6:90

temp:
```
cookie.c:266:11: error: conversion to ‘size_t’ {aka ‘unsigned int’} from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion]
  266 |     h = h ^ (size_t)Curl_raw_toupper(*domain++);
      |           ^
```
Ref: https://github.com/curl/curl/actions/runs/8861448062/job/24333315928?pr=13489#step:6:79
temp:
```
/__w/curl/curl/lib/krb5.c:528:22: error: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Werror=sign-conversion]
     len = (int)ntohl((unsigned long)len);
                      ^
/__w/curl/curl/lib/krb5.c: In function 'do_sec_send':
/__w/curl/curl/lib/krb5.c:651:30: error: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Werror=sign-conversion]
     htonl_bytes = (int)htonl((unsigned long)bytes);
                              ^
```
Ref: https://github.com/curl/curl/actions/runs/8862697118/job/24335936723?pr=13489#step:7:132
```
sws.c:1308:21: warning: implicit conversion changes signedness: 'enum (unnamed enum at sws.c:71:8)' to 'int' [-Wsign-conversion]
  serverfd = socket(socket_domain, SOCK_STREAM, 0);
             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../lib/memdebug.h:140:18: note: expanded from macro 'socket'
 curl_dbg_socket(domain, type, protocol, __LINE__, __FILE__)
 ~~~~~~~~~~~~~~~ ^~~~~~
clang -DHAVE_CONFIG_H   -I../../include -I../../lib -I../../lib  -isystem /home/runner/bearssl/include  -Qunused-arguments -g -O0 -pedantic -Wall -Wextra -Wpointer-arith -Wwrite-strings -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wsign-compare -Wno-multichar -Wundef -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wcast-align -Wno-system-headers -Wshorten-64-to-32 -Wunused -Waddress -Wattributes -Wbad-function-cast -Wconversion -Wdiv-by-zero -Wformat-security -Wempty-body -Wmissing-field-initializers -Wmissing-noreturn -Wold-style-definition -Wredundant-decls -Wtype-limits -Wunreachable-code -Wunused-parameter -Wignored-qualifiers -Wvla -Wsign-conversion -Wshift-sign-overflow -Wlanguage-extension-token -Wformat=2 -Wenum-conversion -Wsometimes-uninitialized -Wmissing-variable-declarations -Wheader-guard -Wunused-const-variable -Wpragmas -Wunreachable-code-break -Wdouble-promotion -Wcomma -Wassign-enum -Wextra-semi-stmt -Wimplicit-fallthrough -Wno-pointer-bool-conversion -MT ../../lib/tftpd-nonblock.o -MD -MP -MF ../../lib/.deps/tftpd-nonblock.Tpo -c -o ../../lib/tftpd-nonblock.o `test -f '../../lib/nonblock.c' || echo './'`../../lib/nonblock.c
sws.c:2136:17: warning: implicit conversion changes signedness: 'enum (unnamed enum at sws.c:71:8)' to 'int' [-Wsign-conversion]
  sock = socket(socket_domain, SOCK_STREAM, 0);
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../lib/memdebug.h:140:18: note: expanded from macro 'socket'
 curl_dbg_socket(domain, type, protocol, __LINE__, __FILE__)
 ~~~~~~~~~~~~~~~ ^~~~~~
2 warnings generated.
```
Ref: https://github.com/curl/curl/actions/runs/8866821106/job/24344717997#step:34:174
Seen on Alpine MUSL.

```
multi.c:1201:9: error: conversion to 'long unsigned int' from 'curl_socket_t' {aka 'int'} may change the sign of the result [-Werror=sign-conversion]
 1201 |         FD_SET(ps.sockets[i], read_fd_set);
      |         ^~~~~~
multi.c:1201:9: error: conversion to 'long unsigned int' from 'curl_socket_t' {aka 'int'} may change the sign of the result [-Werror=sign-conversion]
multi.c:1203:9: error: conversion to 'long unsigned int' from 'curl_socket_t' {aka 'int'} may change the sign of the result [-Werror=sign-conversion]
 1203 |         FD_SET(ps.sockets[i], write_fd_set);
      |         ^~~~~~
multi.c:1203:9: error: conversion to 'long unsigned int' from 'curl_socket_t' {aka 'int'} may change the sign of the result [-Werror=sign-conversion]
```
Ref: https://github.com/curl/curl/actions/runs/8867959370/job/24347027402?pr=13489#step:31:373
```
../../lib/tftp.c: In function 'tftp_send_first':
../../lib/tftp.c:531:46: error: conversion to 'socklen_t' {aka 'int'} from 'unsigned int' may change the sign of the result [-Werror=sign-conversion]
  531 |                       data->conn->remote_addr->addrlen);
      |                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
../../lib/tftp.c: In function 'tftp_connect':
../../lib/tftp.c:1036:36: error: conversion to 'socklen_t' {aka 'int'} from 'unsigned int' may change the sign of the result [-Werror=sign-conversion]
 1036 |                   conn->remote_addr->addrlen);
      |                   ~~~~~~~~~~~~~~~~~^~~~~~~~~

```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/49706723/job/pxrgsssfmunjk2o9#L1212
@vszakats
Copy link
Member Author

Closing in favour of #13501 and cherry-picking from there. It has the same commits as this one.

@vszakats vszakats closed this May 12, 2024
@vszakats vszakats deleted the signwarn-06 branch May 15, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants