Last Comment Bug 335039 - nssCKFWCryptoOperation_UpdateCombo is not declared
: nssCKFWCryptoOperation_UpdateCombo is not declared
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: unspecified
: All All
P2 normal (vote)
: 3.12
Assigned To: Julien Pierre
Depends on:
  Show dependency treegraph
Reported: 2006-04-21 22:07 PDT by Julien Pierre
Modified: 2006-04-22 12:46 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

declare function (1.74 KB, patch)
2006-04-21 22:08 PDT, Julien Pierre
wtc: review+
rrelyea: superreview+
Details | Diff | Splinter Review

Description User image Julien Pierre 2006-04-21 22:07:15 PDT
I wish there was a way to get the compiler to treat this as a build error rather than a warning. ckfw/session.c references this function without a prototype. This can wreak havoc on some architectures depending on the type assumptions made by the compiler. Patch forthcoming.
Comment 1 User image Julien Pierre 2006-04-21 22:08:43 PDT
Created attachment 219398 [details] [diff] [review]
declare function
Comment 2 User image Wan-Teh Chang 2006-04-21 22:23:08 PDT
GCC has the -Werror-implicit-function-declaration flag,
which is what you wanted.  In fact I was planning to suggest
that we use this flag.
Comment 3 User image Nelson Bolyard (seldom reads bugmail) 2006-04-21 22:31:15 PDT
I second that motion!  
use -Werror-implicit-function-declaration, at least on 64-bit builds.
Comment 4 User image Julien Pierre 2006-04-21 22:31:59 PDT
Thanks for the review, Wan-Teh. I agree that we should use that gcc flag on all the platforms that have it. Has it been available in gcc for a long time or is it a recent addition ?

Checking in ckfw.h;
/cvsroot/mozilla/security/nss/lib/ckfw/ckfw.h,v  <--  ckfw.h
new revision: 1.9; previous revision: 1.8
Checking in crypto.c;
/cvsroot/mozilla/security/nss/lib/ckfw/crypto.c,v  <--  crypto.c
new revision: 1.3; previous revision: 1.2
Comment 5 User image Wan-Teh Chang 2006-04-22 12:46:17 PDT

I found -Werror-implicit-function-declaration documented in
the oldest version of GCC (2.95.3) on the GCC documentation site:

search for "-Werror-implicit-function-declaration".

So it should be safe to just use this flag whenever we compile
with GCC.

Note You need to log in before you can comment on or make changes to this bug.