Closed Bug 1561588 Opened 7 months ago Closed 6 months ago

Remove -Wmaybe-uninitialized warning in p7env.c

Categories

(NSS :: Build, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

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

Details

Attachments

(1 file, 1 obsolete 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:

p7env.c: In function ‘EncryptFile’:
p7env.c:121:8: error: ‘rv’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (rv != SECSuccess)
^

Expected results:

No warning.

This patch fixes the warning.

Assignee: nobody → giulio.benetti
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2
Attachment #9074169 - Flags: review?(jjones)
Comment on attachment 9074169 [details] [diff] [review]
0007-Bug-1561588-Remove-Wmaybe-uninitialized-warning-in-p.patch

Moving to Marcus (hope you don't mind!)
Attachment #9074169 - Flags: review?(jjones) → review?(marcus.apb)
Comment on attachment 9074169 [details] [diff] [review]
0007-Bug-1561588-Remove-Wmaybe-uninitialized-warning-in-p.patch

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

Hi Giulio,

Nit: Could you initialize in the line 136 too, please?

Thanks,
Attachment #9074169 - Flags: review?(marcus.apb) → review-

Here is the requested patch.

Best regards

Attachment #9074169 - Attachment is obsolete: true
Comment on attachment 9078362 [details] [diff] [review]
0002-Bug-1561588-Remove-Wmaybe-uninitialized-warning-in-p.patch

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

Thanks Giulio.
Attachment #9078362 - Flags: review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 6 months 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.