-
Notifications
You must be signed in to change notification settings - Fork 463
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
tls-gnutls: error: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result #5532
Comments
paulmenzel
added a commit
to paulmenzel/cups
that referenced
this issue
Feb 25, 2019
Fix the error below (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609): Compiling tls.c... In file included from tls.c:39:0: tls-gnutls.c: In function ‘httpCredentialsAreValidForName’: tls-gnutls.c:420:56: error: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion] if (!gnutls_x509_crl_get_crt_serial(tls_crl, (unsigned)i, rserial, &r ^ Fixes: apple#5532
paulmenzel
added a commit
to paulmenzel/cups
that referenced
this issue
Feb 25, 2019
Fix the error below (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609): Compiling tls.c... In file included from tls.c:39:0: tls-gnutls.c: In function ‘httpCredentialsAreValidForName’: tls-gnutls.c:420:56: error: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion] if (!gnutls_x509_crl_get_crt_serial(tls_crl, (unsigned)i, rserial, &r ^ Fixes: apple#5532
paulmenzel
added a commit
to paulmenzel/cups
that referenced
this issue
Feb 25, 2019
Fix the error below (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609): Compiling tls.c... In file included from tls.c:39:0: tls-gnutls.c: In function ‘httpCredentialsAreValidForName’: tls-gnutls.c:420:56: error: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion] if (!gnutls_x509_crl_get_crt_serial(tls_crl, (unsigned)i, rserial, &r ^ Revert commit 163a773 (Fix compiler warning.). Fixes: apple#5532
It looks like, commit 163a773 (Fix compiler warning.) should be reverted. |
Depending on the version of GNU TLS you are using, the prototype for this function is different (!). I will investigate whether we can come up with a more bullet-proof solution for this... |
Looks like using an iterator will solve this particular issue, and also be faster if the CRL is long. |
michaelrsweet
added a commit
that referenced
this issue
Feb 25, 2019
michaelrsweet
added a commit
that referenced
this issue
Feb 25, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609 gives the error below.
The text was updated successfully, but these errors were encountered: