Remove -Wmaybe-uninitialized warning in pqg.c
Categories
(NSS :: Build, defect, P2)
Tracking
(Not tracked)
People
(Reporter: giulio.benetti, Assigned: giulio.benetti)
Details
Attachments
(1 file, 1 obsolete file)
|
1.65 KB,
patch
|
marcus.apb
:
review+
|
Details | Diff | Splinter Review |
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 NSS_BUILD_SOFTOKEN_ONLY=1
Actual results:
pqg.c: In function ‘PQG_VerifyParams’:
pqg.c:1806:27: error: ‘type’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if ((vfy->h.len == 1) && (type != FIPS186_1_TYPE)) {
^
In file included from pqg.c:21:0:
secmpi.h:8:8: error: ‘hashtype’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (SECSuccess != (rv = func))
^
pqg.c:1624:19: note: ‘hashtype’ was declared here
HASH_HashType hashtype;
^
cc1: all warnings being treated as errors
Expected results:
No warnings at all.
| Assignee | ||
Comment 1•7 years ago
|
||
This patch fixes the warning.
Updated•7 years ago
|
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
| Assignee | ||
Comment 4•7 years ago
|
||
| Assignee | ||
Comment 5•7 years ago
|
||
Hi Marcus,
above is the patch requested with no newline. I attach a new one. Sorry.
| Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Giulio Benetti from comment #5)
Hi Marcus,
above is the patch requested with no newline. I attach a new one. Sorry.
Nope, it's ok as it is.
| Assignee | ||
Comment 7•7 years ago
|
||
Kindly ping.
Comment 8•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Thanks again Giulio for these patches!
| Assignee | ||
Comment 11•7 years ago
|
||
You're welcome, it's been a pleasure contributing with these patches :)
Description
•