Warnings for calls to undeclared or redeclared functions

RESOLVED FIXED in 3.4

Status

NSS
Libraries
P2
normal
RESOLVED FIXED
17 years ago
16 years ago

People

(Reporter: Nelson Bolyard (seldom reads bugmail), Assigned: Robert Relyea)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

There are 59 warnings about calls to undeclared or redeclared functions
in NSS on the trunk, at this time.  Most warnings are in pk11 and cert 
code. I will attach a list shortly.  

Assigning this bug to relyea, with his permission.
(Reporter)

Comment 1

17 years ago
Mozilla insists this file is empty, so I'll just paste it here:

atav.c:1748: implicit declaration `nsslibc_compare'
blapitest.c:2080: implicit declaration `RNG_SystemInfoForRNG'
certdb.c:1913: implicit declaration `PK11_ImportCert'
certgen.c:528: implicit declaration `CERT_AddTempCertToPerm'
certhigh.c:852: implicit declaration `PK11_ImportCert'
certutil.c:2549: implicit declaration `CERT_GetDBContentVersion'
certutil.c:350: implicit declaration `PK11_ImportCert'
certutil.c:694: implicit declaration `SEC_DeletePermCertificate'
certvfy.c:237: implicit declaration `SEC_CheckCrlTimes'
cmscipher.c:91: implicit declaration `SEC_PKCS5IsAlgorithmPBEAlg'
cmsencdata.c:246: implicit declaration `SEC_PKCS5IsAlgorithmPBEAlg'
cmsenvdata.c:385: implicit declaration `SEC_PKCS5IsAlgorithmPBEAlg'
crl.c:441: implicit declaration `SEC_CrlIsNewer'
crl.c:598: implicit declaration `PK11_LookupCrls'
dev3hack.c:126: implicit declaration `nssPKCS11StringLength'
install.c:698: implicit declaration `chmod'
instinit.c:322: implicit declaration `__CERT_NewTempCertificate'
jarevil.c:344: implicit declaration `CERT_AddTempCertToPerm'
jarjart.c:130: implicit declaration `SEC_TraversePermCerts'
keydb.c:636: implicit declaration `seckey_HasAServerKey'
lowcert.c:133: implicit declaration `nss_InitLock'
modutil.c:814: implicit declaration `RawListModule'
modutil.c:817: implicit declaration `RawAddModule'
newuser.c:756: implicit declaration `NSS_NoDB_Init'
oid.c:327: implicit declaration `nsslibc_memcmp'
p12d.c:2337: implicit declaration `SEC_DeletePermCertificate'
p12dec.c:394: implicit declaration `SEC_PKCS5IsAlgorithmPBEAlg'
p12plcy.c:117: implicit declaration `SEC_PKCS5GetPBEAlgorithm'
p12plcy.c:69: implicit declaration `SEC_PKCS5GetCryptoAlgorithm'
p12plcy.c:74: implicit declaration `SEC_PKCS5GetKeyLength'
p7decode.c:718: implicit declaration `SEC_PKCS5IsAlgorithmPBEAlg'
p7local.c:115: implicit declaration `SEC_PKCS5IsAlgorithmPBEAlg'
pcertdb.c:2784: implicit declaration `nsslowcert_IsNewer'
pk11cert.c:2284: implicit declaration `nssToken_TraverseCertificatesByTemplate'
pk11cert.c:2396: implicit declaration `nssToken_TraverseCertificates'
pk11slot.c:3452: implicit declaration `pbe_PK11AlgidToParam'
pk11slot.c:3859: implicit declaration `PBE_PK11ParamToAlgid'
pk11util.c:358: implicit declaration `STAN_AddNewSlotToDefaultTD'
pkcs11.c:1458: implicit declaration `pk11_convertSessionToToken'
pkcs11.c:2096: implicit declaration `RNG_SystemInfoForRNG'
pkcs11.c:2324: implicit declaration `nsslowcert_GetCertTrust'
pkcs11.c:3151: implicit declaration `nsslowcert_TraverseDBEntries'
pkcs11.c:3278: implicit declaration `nsslowkey_TraverseKeys'
pkcs11.c:3418: implicit declaration `nsslowcert_NumPermCertsForNickname'
pkcs11.c:3420: implicit declaration `nsslowcert_TraversePermCertsForNickname'
pkcs11.c:3426: implicit declaration `nsslowcert_NumPermCertsForSubject'
pkcs11.c:3428: implicit declaration `nsslowcert_TraversePermCertsForSubject'
pkcs11.c:3478: implicit declaration `nsslowcert_hasTrust'
pkcs11.c:628: implicit declaration `nsslowcert_ChangeCertTrust'
pkcs11.c:849: implicit declaration `nsslowcert_SaveSMimeProfile'
pkcs11u.c:1315: implicit declaration `pk11_MapTrust'
pkcs11u.c:1344: implicit declaration `nsslowcert_ChangeCertTrust'
pkcs11u.c:483: implicit declaration `SHA1_HashBuf'
pkcs11u.c:896: implicit declaration `MD5_HashBuf'
seccnames.c:153: implicit declaration `SEC_TraversePermCerts'
wrap.c:157: implicit declaration `nssSetLockArgs'
keydb.c:636: previous declaration of `seckey_HasAServerKey'
keydb.c:549: static declaration for `nsslowkey_UpdateKeyDBPass2' follows non-sta
tic
keydb.c:566: static declaration for `nsslowkey_UpdateKeyDBPass1' follows non-sta
tic
(Reporter)

Comment 2

17 years ago
I meant that bugzilla (not mozilla) complained that the attachment was
empty when it clearly wasn't.

Here are some other potentially useful warnings:

certcgi.c:632: decimal constant is so large that it is unsigned

instinit.c:152: return-type defaults to `int'
newuser.c:607: return-type defaults to `int'
pk11.c:307: return-type defaults to `int'

certcgi.c:149: `PasswordStub' defined but not used
certcgi.c:403: `update_data_by_name' defined but not used
certcgi.c:430: `update_data_by_index' defined but not used
certcgi.c:446: `add_field' defined but not used
certutil.c:878: `printKeyCB' defined but not used
cryptocontext.c:433: `get_token_session' defined but not used
devslot.c:73: `nss_ck_slot_notify' defined but not used
devtoken.c:346: `collect_certs_callback' defined but not used
keystuff.c:192: `default_pqg_params' defined but not used
pkcs11.c:3528: `pk11_searchSMimeForCert' defined but not used
selfserv.c:380: `qCount' defined but not used
sessobj.c:111: `nss_ckmdSessionObject_verifyPointer' defined but not used
sessobj.c:827: `nss_ckmdFindSessionObjects_verifyPointer' defined but not used
sslsnce.c:289: `IOError' defined but not used
util.c:474: `certDBNameCallback' defined but not used

pk7print.c:155: assignment discards `const' from pointer target type
pk7print.c:853: assignment discards `const' from pointer target type
secutil.c:1003: assignment discards `const' from pointer target type
secutil.c:2131: assignment discards `const' from pointer target type

blapitest.c:1088: assignment from incompatible pointer type
blapitest.c:1104: assignment from incompatible pointer type
pk11cert.c:2902: assignment from incompatible pointer type

certutil.c:1227: too few arguments for format
secutil.c:2394: zero-length format string
instinit.c:267: int format, long int arg (arg 2)
cmsutil.c:1301: unsigned int format, pointer arg (arg 3)
cmsutil.c:1302: unsigned int format, pointer arg (arg 3)
cmsutil.c:403: unsigned int format, pointer arg (arg 3)
crlutil.c:130: too many arguments for format

cryptocontext.c:454: control reaches end of non-void function
cryptocontext.c:519: control reaches end of non-void function

pcertdb.c: 1 trigraph(s) encountered
ssltap.c: 3 trigraph(s) encountered

keydb.c:1990: `seckey_HasAServerKey' was declared implicitly `extern' and later
`static'

sdrtest.c:284: field width is not type int (arg 2)
ocsp.c:2773: statement with no effect

Comment 3

17 years ago
Target 3.4, priority P2.
Priority: -- → P2
Target Milestone: --- → 3.4
(Reporter)

Comment 4

17 years ago
I definitely want to see all these "implicit delcaration" bugs 
(calls to undeclared functions) fixed before we ship 3.4.
(Assignee)

Comment 5

17 years ago
Actually this should be closed. I believe I have fixed all the implicit
declaration warnings in NSS (which is verified because implicit declaration is
an error on the mac).

If any new ones pop up, this bug should be reopenned.

bob
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

17 years ago
A look through today's Win32 build log reveals numerous calls to 
undeclared functions.  
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 7

16 years ago
I fixed all the "implicit declaration of function" warnings
reported by gcc on Red Hat Linux 7.2 (bug 131078) and verified
my fix on Windows, with two exceptions:
1. bug 130968: SEC_TraversePermCerts
2. bug 130977: CERT_GetDBContentVersion

I am marking this bug fixed.
Status: REOPENED → RESOLVED
Last Resolved: 17 years ago16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.