build failure while implicitly casting SECStatus to PRUInt32
Categories
(NSS :: Build, defect, P1)
Tracking
(Not tracked)
People
(Reporter: fkrenzel, Assigned: rrelyea)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36
Steps to reproduce:
There was a mass rebuild for f38 that failed.
Actual results:
The build failed due to enum/integer mismatch between SECStatus/PRUInt32
Comment 1•1 year ago
|
||
Thank you for the report.
ssl3exthandle.c:205:1: error: conflicting types for 'ssl3_ClientSendSessionTicketXtn' due to enum/integer mismatch; have 'PRInt32(const sslSocket *, TLSExtensionData *, sslBuffer *, PRBool *)' {aka 'int(const struct sslSocketStr *, struct TLSExtensionDataStr *, struct sslBufferStr *, int *)'} [-Werror=enum-int-mismatch]
205 | ssl3_ClientSendSessionTicketXtn(const sslSocket *ss, TLSExtensionData *xtnData,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ssl3exthandle.c:17:
ssl3exthandle.h:116:11: note: previous declaration of 'ssl3_ClientSendSessionTicketXtn' with type 'SECStatus(const sslSocket *, TLSExtensionData *, sslBuffer *, PRBool *)' {aka 'enum _SECStatus(const struct sslSocketStr *, struct TLSExtensionDataStr *, struct sslBufferStr *, int *)'}
116 | SECStatus ssl3_ClientSendSessionTicketXtn(const sslSocket *ss,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This code hasn't changed in ~5 years, but the report looks correct. I guess you are using gcc 13 which added this check? But then I'm not sure how it built for you the first time. Regardless, I'll take a look and get this fixed.
Updated•1 year ago
|
Updated•1 year ago
|
Author of the patch: Bob Relyea <rrelyea@redhat.com>
Assignee | ||
Comment 3•1 year ago
|
||
yes, gcc has stronger warnings on enum to int implicit casts. I'm actually surprised we only had two issues.
Comment 4•1 year ago
|
||
Me too! Thanks for handling it Bob!
https://hg.mozilla.org/projects/nss/rev/74fe0d4ffdad85936871b768e118600b4ce57bd1
Description
•