Closed Bug 501614 Opened 16 years ago Closed 14 years ago

jsinterp.cpp:1705: warning: ‘isFunction’ may be used uninitialized in this function

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jseward, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [build_warning])

User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 Build Identifier: Branch: tracemonkey. With a debug build of js configured thusly CC="gcc -m32" CXX="g++ -m32" AR=ar ../configure --enable-debug \ --enable-optimize="-g -O" --target=i686-pc-linux-gnu gcc-4.3.1 complains that jsinterp.cpp:1705: warning: ‘isFunction’ may be used uninitialized in this function and at least from a naive interpretation of the control flow, it is possible to get from the entrance to a use point, which I suspect is type = (attrs == JSPROP_INITIALIZER) ? "property" : (oldAttrs & attrs & JSPROP_GETTER) ? js_getter_str : (oldAttrs & attrs & JSPROP_SETTER) ? js_setter_str : (oldAttrs & JSPROP_READONLY) ? js_const_str : isFunction <----------------------- ? js_function_str : js_var_str; without going through a definition. Merely changing the declaration of isFunction thusly shuts it up and does not appear to break anything: JSBool isFunction = false; /* keeps gcc happy */ It may be that I'm seeing this because my debug build is still done with gcc -O (hence dataflow analysis), which is probably unusual. Reproducible: Always
strictly speaking this isn't a nanojit bug, as jsinterp.cpp doesn't live there.
Assignee: nobody → general
Component: JIT Compiler (NanoJIT) → JavaScript Engine
Product: Tamarin → Core
QA Contact: nanojit → general
Whiteboard: [build_warning]
Blocks: buildwarning
I could not see any warning in the jsinterp.cpp file. I also verified this with the debug build and with nightly build of linux and macos. Hence, closing this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.