Closed Bug 1812671 Opened 2 years ago Closed 2 years ago

build failure while implicitly casting SECStatus to PRUInt32

Categories

(NSS :: Build, defect, P1)

3.87

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fkrenzel, Assigned: rrelyea)

Details

Attachments

(2 files)

Attached file tail.log

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

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.

Assignee: nobody → djackson
Severity: -- → S4
Priority: -- → P1

yes, gcc has stronger warnings on enum to int implicit casts. I'm actually surprised we only had two issues.

Assignee: djackson → rrelyea
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: