Closed Bug 562525 Opened 15 years ago Closed 15 years ago

nsPropertiesParser::FinishValueState potentially uses a variable uninitialized dependent on a member of a class in a file with threadsafe classes

Categories

(Core :: XPCOM, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: timeless, Assigned: timeless)

Details

Attachments

(1 file)

Darwin timeless-mbp.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386 i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1) In member function ‘virtual nsresult nsPersistentProperties::Load(nsIInputStream*)’: nsPersistentProperties.cpp:130: warning: ‘backup_char’ may be used uninitialized in this function note: ‘backup_char’ was declared here In member function ‘PRBool nsPropertiesParser::ParseValueCharacter(PRUnichar, const PRUnichar*, const PRUnichar*&, nsAString_internal&)’: nsPersistentProperties.cpp:130: warning: ‘backup_char’ may be used uninitialized in this function note: ‘backup_char’ was declared here In member function ‘nsresult nsPropertiesParser::ParseBuffer(const PRUnichar*, PRUint32)’: nsPersistentProperties.cpp:130: warning: ‘backup_char’ may be used uninitialized in this function note: ‘backup_char’ was declared here This only happens with optimized builds, and it's rather annoying.
ok, i'm willing to accept gcc's complaint.
Summary: gcc foolishly complains about a supposedly uninitialized variable in each caller of an inlined function → nsPropertiesParser::FinishValueState potentially uses a variable uninitialized dependent on a member of a class in a file with threadsafe classes
Assignee: nobody → timeless
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #442269 - Flags: review?(benjamin)
Attachment #442269 - Flags: review?(benjamin) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: