Duplicate declaration of CERT_DecodeDERCertificate (compiler warnings)

RESOLVED FIXED in 3.10

Status

P3
minor
RESOLVED FIXED
15 years ago
14 years ago

People

(Reporter: chris.newman, Assigned: wtc)

Tracking

3.9.2
3.10
PowerPC
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
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.
(Reporter)

Updated

15 years ago
Version: unspecified → 3.9.2
(Assignee)

Updated

15 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → 3.10
(Assignee)

Comment 1

15 years ago
Created attachment 152072 [details] [diff] [review]
Proposed patch

Remove the second declaration.	The first declaration
has a better comment.
(Assignee)

Updated

15 years ago
Attachment #152072 - Flags: review?(nelson)
Comment on attachment 152072 [details] [diff] [review]
Proposed patch

r=nelson
Attachment #152072 - Flags: review?(nelson) → review+
(Assignee)

Comment 3

15 years ago
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
Last Resolved: 15 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.