fix some debug only warnings in js/src/jsemit.cpp

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Robert Sayre, Assigned: Robert Sayre)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
jsemit.cpp: In function ‘JSBool js_EmitTree(JSContext*, JSCodeGenerator*, JSParseNode*)’:
jsemit.cpp:5183: warning: ‘tps.TempPopScope::savedScopeStmt’ may be used uninitialized in this function
jsemit.cpp:5183: warning: ‘tps.TempPopScope::savedBlockBox’ may be used uninitialized in this function
jsemit.cpp:6697: warning: ‘tps.TempPopScope::savedScopeStmt’ may be used uninitialized in this function
jsemit.cpp:6697: warning: ‘tps.TempPopScope::savedBlockBox’ may be used uninitialized in this function
jsemit.cpp: In function ‘JSBool EmitSwitch(JSContext*, JSCodeGenerator*, JSParseNode*, JSStmtInfo*)’:
jsemit.cpp:3177: warning: ‘tps.TempPopScope::savedScopeStmt’ may be used uninitialized in this function
jsemit.cpp:3177: warning: ‘tps.TempPopScope::savedBlockBox’ may be used uninitialized in this function
(Assignee)

Comment 1

6 years ago
Created attachment 552793 [details] [diff] [review]
add the other two member variables
Assignee: general → sayrer
(Assignee)

Updated

6 years ago
Attachment #552793 - Flags: review?(jorendorff)
Attachment #552793 - Flags: review?(jorendorff) → review+
(Assignee)

Updated

6 years ago
Whiteboard: [checkin-needed]
This warning isn't debug-only. I only see it in opt builds. I'm going to get rid of the #ifdef as well and just always initialize these.

I pushed this to jsdbg2 branch. In hindsight that's a pretty silly thing to have done, but it'll land with jsdbg2, I think this weekend. If it doesn't, or if jsdbg2 bounces, I'll push it to mozilla-inbound separately.
Whiteboard: [checkin-needed]
http://hg.mozilla.org/mozilla-central/rev/3cc01fa9d8fb
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.