Closed
Bug 131078
Opened 22 years ago
Closed 22 years ago
Compiler warning fixes
Categories
(NSS :: Libraries, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
3.4
People
(Reporter: wtc, Assigned: wtc)
References
Details
Attachments
(1 file)
10.03 KB,
patch
|
bugz
:
review+
|
Details | Diff | Splinter Review |
I fixed some of the compiler warnings from compiling NSS 3.4 on Red Hat Linux 7.2. A patch is coming up.
Assignee | ||
Comment 1•22 years ago
|
||
The compiler warnings I fixed include: 1. implicit declaration of functions; 2. mismatch of fprintf format specifiers and arguments; 3. trigraph ??/ converted to \ ; 4. missing 'const' ; 5. __CERT_NewTempCertificate is not declared in cert.h, but CERT_NewTempCertificate is. Please review my patch. Thanks.
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → 3.4
Comment 2•22 years ago
|
||
Comment on attachment 74270 [details] [diff] [review] Proposed patch looks good to me (wow, cleanup of the tools ;)
Attachment #74270 -
Flags: review+
Assignee | ||
Comment 3•22 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 4•22 years ago
|
||
If you know a better way to fix the trigraph problem (??/ converted to \), please let me know. The other idea I have is to change "??/" to "?\?/". I find that less readable than "??" "/".
Comment 5•22 years ago
|
||
I don't understand the change to certutil.c It appears that the old and new lines are identical. Was the change in that file simply an addition or deletion of whitespace? What warning did that fix? As for trigraphs, is there an option to disable them, so the linux compiler won't alter string constants?
Assignee | ||
Comment 6•22 years ago
|
||
Comment on attachment 74270 [details] [diff] [review] Proposed patch Nelson, >Index: mozilla/security/nss/cmd/certutil/certutil.c >=================================================================== >RCS file: /cvsroot/mozilla/security/nss/cmd/certutil/certutil.c,v >retrieving revision 1.50 >diff -u -r1.50 certutil.c >--- mozilla/security/nss/cmd/certutil/certutil.c 27 Feb 2002 22:12:06 -0000 1.50 >+++ mozilla/security/nss/cmd/certutil/certutil.c 15 Mar 2002 03:46:30 -0000 >@@ -1119,7 +1119,7 @@ > FPS "\t%s -R -s subj -o cert-request-file [-d certdir] [-P dbprefix] [-p phone] [-a]\n" > "\t\t [-k key-type] [-h token-name] [-f pwfile] [-g key-size]\n", > progName); >- FPS "\t%s -V -n cert-name -u usage [-b time] [-e] \n", >+ FPS "\t%s -V -n cert-name -u usage [-b time] [-e] \n" > "\t\t[-X] [-d certdir] [-P dbprefix]\n", > progName); > FPS "\t%s -S -n cert-name -s subj [-c issuer-name | -x] -t trustargs\n" In this change, I removed the comma (,) so that the two string literals are concatenated by the compiler, which is the intention of the code. (That's what the neighboring FPS statements do.) The compiler warned that there is only one format specifier (%s) but two arguments (the second string literal and 'progName'). >@@ -1301,7 +1301,7 @@ > " -d certdir"); > FPS "%-20s Cert & Key database prefix\n", > " -P dbprefix"); >- FPS "%-20s Token to reset (default is internal)\n" >+ FPS "%-20s Token to reset (default is internal)\n", > " -h token-name"); > FPS "\n"); In this change, I added a comma (,) so that the two string literals are NOT concatenated by the compiler. Again, if you look at the neighboring FPS statements, you'll see that that's the intention of the code. The compiler warned that there is one format specifier (%-20s) but no argument (because the two string literals are concatenated).
Comment 7•22 years ago
|
||
Thanks, I looked several times but didn't see those commas in the diffs.
You need to log in
before you can comment on or make changes to this bug.
Description
•