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

altsvc: silence -Wsign-conversion #13466

Closed
wants to merge 1 commit into from
Closed

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Apr 24, 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

Closes #13466

```
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

Closes #xxxxx
@vszakats
Copy link
Member Author

Closing in favour of #13481.

@vszakats vszakats closed this Apr 27, 2024
@vszakats vszakats deleted the signwarn-01 branch April 27, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant