Closed Bug 249284 Opened 20 years ago Closed 20 years ago

Duplicate declaration of CERT_DecodeDERCertificate (compiler warnings)

Categories

(NSS :: Libraries, defect, P3)

3.9.2
PowerPC
macOS

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chris.newman, Assigned: wtc)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20021104 Chimera/0.6
Build Identifier: NSS 3.9.2 

The include file cert.h declares CERT_DecodeDERCertificate twice: once at line
387 and again at line 718.  This generates a warning when using GCC with
-Wredundant-decls.

There are also some warnings in that header when using -Wshadow, including:
In file included from
../../../external/security/Darwin7_PPC_DBG.OBJ/include/cert.h:52,
                 from certmap.c:44:
../../../external/security/Darwin7_PPC_DBG.OBJ/include/certt.h:736: warning:
declaration of `time' shadows a global declaration
/usr/include/time.h:128: warning: shadowed declaration is here
In file included from certmap.c:44:
../../../external/security/Darwin7_PPC_DBG.OBJ/include/cert.h:284: warning:
declaration of `time' shadows a global declaration
/usr/include/time.h:128: warning: shadowed declaration is here
../../../external/security/Darwin7_PPC_DBG.OBJ/include/cert.h:606: warning:
declaration of `log' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
../../../external/security/Darwin7_PPC_DBG.OBJ/include/cert.h:623: warning:
declaration of `log' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
../../../external/security/Darwin7_PPC_DBG.OBJ/include/cert.h:636: warning:
declaration of `log' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
../../../external/security/Darwin7_PPC_DBG.OBJ/include/cert.h:646: warning:
declaration of `log' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here


Reproducible: Always
Steps to Reproduce:
1.
2.
3.



Expected Results:  
Compile code that includes cert.h with no warnings when using -W -Wall -Wshadow
and -Wredundant-decls.
Version: unspecified → 3.9.2
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → 3.10
Attached patch Proposed patchSplinter Review
Remove the second declaration.	The first declaration
has a better comment.
Attachment #152072 - Flags: review?(nelson)
Comment on attachment 152072 [details] [diff] [review]
Proposed patch

r=nelson
Attachment #152072 - Flags: review?(nelson) → review+
Fixed on the NSS tip.

Checking in cert.h;
/cvsroot/mozilla/security/nss/lib/certdb/cert.h,v  <--  cert.h
new revision: 1.47; previous revision: 1.46
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Setting priorities on unprioritized bugs resolved fixed for NSS 3.10.
Setting this to P3, since it was motivated only as warning reduction.
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: