Closed Bug 1474274 Opened 6 years ago Closed 6 years ago

Bad signature for getDefaultRSAPrivateKey and getDefaultRSAPublicKeyWrong functions

Categories

(NSS :: Build, defect)

3.37
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mliska, Assigned: mliska)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36

Steps to reproduce:

Build mozilla-nss with LTO.


Actual results:

[  233s] rsaperf.c:25:28: error: type of 'getDefaultRSAPublicKey' does not match original declaration [-Werror=lto-type-mismatch]
[  233s]  extern NSSLOWKEYPublicKey *getDefaultRSAPublicKey(void);
[  233s]                             ^
[  233s] defkey.c:225:1: note: type mismatch in parameter 1
[  233s]  getDefaultRSAPublicKey(int keysize)
[  233s]  ^
[  233s] defkey.c:225:1: note: type 'int' should match type 'void'
[  233s] defkey.c:225:1: note: 'getDefaultRSAPublicKey' was previously declared here
[  233s] rsaperf.c:24:29: error: type of 'getDefaultRSAPrivateKey' does not match original declaration [-Werror=lto-type-mismatch]
[  233s]  extern NSSLOWKEYPrivateKey *getDefaultRSAPrivateKey(void);
[  233s]                              ^
[  233s] defkey.c:172:1: note: type mismatch in parameter 1
[  233s]  getDefaultRSAPrivateKey(int keysize)
[  233s]  ^
[  233s] defkey.c:172:1: note: type 'int' should match type 'void'
[  233s] defkey.c:172:1: note: 'getDefaultRSAPrivateKey' was previously declared here
[  233s] lto1: all warnings being treated as errors
[  233s] lto-wrapper: fatal error: cc returned 1 exit status
Attached patch patch candidateSplinter Review
Attachment #8990690 - Flags: review?
Comment on attachment 8990690 [details] [diff] [review]
patch candidate

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

Interesting. I would've expected that the compiler complains about this.
Thanks for the patch!
Attachment #8990690 - Flags: review? → review+
Assignee: nobody → mliska
https://hg.mozilla.org/projects/nss/rev/37406d01adc9b59b83bcab470030aca7c292bce9
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: