Last Comment Bug 396044 - Warning: usage of uninitialized variable in ckfw/object.c(174)
: Warning: usage of uninitialized variable in ckfw/object.c(174)
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: unspecified
: All All
: -- normal (vote)
: 3.12
Assigned To: Bruno 'Aqualon' Escherl
:
Mentors:
http://bonsai.mozilla.org/cvsblame.cg...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-13 09:20 PDT by Bruno 'Aqualon' Escherl
Modified: 2007-12-11 16:42 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
return NULL instead of uninitialized fwObject (918 bytes, patch)
2007-12-01 05:39 PST, Bruno 'Aqualon' Escherl
rrelyea: review+
Details | Diff | Review

Description Bruno 'Aqualon' Escherl 2007-09-13 09:20:16 PDT
VC8 reports a warning C4700, cause *fwObject isn't initialized before it's returned (see URL).
Comment 1 Bruno 'Aqualon' Escherl 2007-12-01 05:39:31 PST
Created attachment 290980 [details] [diff] [review]
return NULL instead of uninitialized fwObject

The patch changes the return value to (NSSCKFWObject *)NULL (like it's done in similar cases before and after the changed line in that file).
Comment 2 Nelson Bolyard (seldom reads bugmail) 2007-12-01 20:09:10 PST
Comment on attachment 290980 [details] [diff] [review]
return NULL instead of uninitialized fwObject

Let's ask the author for review
Comment 3 Robert Relyea 2007-12-03 12:03:23 PST
Comment on attachment 290980 [details] [diff] [review]
return NULL instead of uninitialized fwObject

r+ rrelyea

or alternately fwObject could be initialized to NULL, but this patch follows the existing style better.

bob
Comment 4 Reed Loden [:reed] (use needinfo?) 2007-12-03 20:09:58 PST
NSS is restricted, so somebody from NSS will need to commit this for you.
Comment 5 Reed Loden [:reed] (use needinfo?) 2007-12-11 11:30:51 PST
wtc, mind landing this for Aqualon? I don't have access to NSS.
Comment 6 Wan-Teh Chang 2007-12-11 16:42:16 PST
I checked in the patch on the NSS trunk for NSS 3.12.

Checking in object.c;
/cvsroot/mozilla/security/nss/lib/ckfw/object.c,v  <--  object.c
new revision: 1.15; previous revision: 1.14
done

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