Closed Bug 1561591 Opened 5 years ago Closed 5 years ago

Remove -Wmaybe-uninitialized warning in tstclnt.c

Categories

(NSS :: Build, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: giulio.benetti, Assigned: giulio.benetti)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36

Steps to reproduce:

make nss_build_all BUILD_OPT=1 ALLOW_OPT_CODE_SIZE=1 OPT_CODE_SIZE=1
but using -Og flag instead of -Os.

Actual results:

In file included from ../../../dist/public/nss/seccomon.h:16,
from ../../../dist/private/nss/secutil.h:7,
from tstclnt.c:11:
tstclnt.c: In function ‘restartHandshakeAfterServerCertIfNeeded’:
../../../dist/public/nss/utilrename.h:65:23: error: ‘error’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
#define PORT_SetError PORT_SetError_Util
^~~~~~~~~~~~~~~~~~
tstclnt.c:920:17: note: ‘error’ was declared here
PRErrorCode error;
^~~~~

Expected results:

No warning.

This patch fixes the warning.

Assignee: nobody → giulio.benetti
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2
Attachment #9074167 - Flags: review?(kjacobs.bugzilla)
Comment on attachment 9074167 [details] [diff] [review]
0008-Bug-1561591-Remove-Wmaybe-uninitialized-warning-in-t.patch

Review of attachment 9074167 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #9074167 - Flags: review?(kjacobs.bugzilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 3.46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: