Bug 59482

Summary: Unused but set variable warning in MacroAssemberX86_64
Product: WebKit Reporter: Xan Lopez <xan.lopez>
Component: JavaScriptCoreAssignee: Xan Lopez <xan.lopez>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, dbates, eric, menard, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 59568    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Xan Lopez 2011-04-26 12:08:37 PDT
../../Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h: In member function ‘JSC::AbstractMacroAssembler<JSC::X86Assembler>::Call JSC::MacroAssemblerX86_64::call()’:
../../Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:118:22: warning: variable ‘label’ set but not used [-Wunused-but-set-variable]
../../Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h: In member function ‘JSC::AbstractMacroAssembler<JSC::X86Assembler>::Call JSC::MacroAssemblerX86_64::tailRecursiveCall()’:
../../Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:126:22: warning: variable ‘label’ set but not used [-Wunused-but-set-variable]
../../Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h: In member function ‘JSC::AbstractMacroAssembler<JSC::X86Assembler>::Call JSC::MacroAssemblerX86_64::makeTailRecursiveCall(JSC::AbstractMacroAssembler<JSC::X86Assembler>::Jump)’:
../../Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:135:22: warning: variable ‘label’ set but not used [-Wunused-but-set-variable]
  CXX    Source/JavaScriptCore/runtime/libJavaScriptCore_la-JSLock.lo
  CXX    Source/JavaScriptCore/runtime/libJavaScriptCore_la-JSNotAnObject.lo
../../Source/JavaScriptCore/runtime/JSLock.cpp: In static member function ‘static void JSC::JSLock::lock(JSC::JSLockBehavior)’:
../../Source/JavaScriptCore/runtime/JSLock.cpp:91:13: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
../../Source/JavaScriptCore/runtime/JSLock.cpp: In static member function ‘static void JSC::JSLock::unlock(JSC::JSLockBehavior)’:
../../Source/JavaScriptCore/runtime/JSLock.cpp:111:13: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]


Trivial patch coming.
Comment 1 Xan Lopez 2011-04-26 12:10:50 PDT
Created attachment 91143 [details]
Patch
Comment 2 Daniel Bates 2011-04-26 16:22:18 PDT
Comment on attachment 91143 [details]
Patch

I wish there was a better way we could do this. This looks sane to me.
Comment 3 Xan Lopez 2011-04-26 16:32:10 PDT
Comment on attachment 91143 [details]
Patch

Landed as r84977.
Comment 4 Xan Lopez 2011-04-26 16:32:21 PDT
Closing.
Comment 5 WebKit Review Bot 2011-04-26 17:23:41 PDT
http://trac.webkit.org/changeset/84977 might have broken SnowLeopard Intel Release (Tests)
The following tests are not passing:
accessibility/anchor-linked-anonymous-block-crash.html
accessibility/aria-activedescendant-crash.html
accessibility/aria-checkbox-checked.html
accessibility/aria-checkbox-text.html
accessibility/aria-combobox.html
accessibility/aria-controls-with-tabs.html
accessibility/aria-describedby-on-input.html
accessibility/aria-disabled.html
accessibility/aria-help.html
accessibility/aria-hidden-update.html
accessibility/aria-hidden-with-elements.html
accessibility/aria-hidden.html
accessibility/aria-label.html
accessibility/aria-labelledby-on-input.html
accessibility/aria-labelledby-overrides-label.html
accessibility/aria-labelledby-stay-within.html
accessibility/aria-link-supports-press.html
accessibility/aria-list-and-listitem.html
accessibility/aria-option-role.html
accessibility/aria-presentational-role.html
Comment 6 Daniel Bates 2011-04-26 18:48:35 PDT
This patch was rolled out in <http://trac.webkit.org/changeset/85000> (bug #59568).
Comment 7 Xan Lopez 2011-04-26 22:43:00 PDT
Created attachment 91234 [details]
Patch
Comment 8 Xan Lopez 2011-04-26 22:46:12 PDT
OK, that was obviously broken. Unfortunately we even need an even slightly uglier patch here... I wonder if there's a way of flagging a variable as unused, we could do that for release builds here. Maybe just (void)var;, like ASSERT_UNUSED, but without using the macro because we need it in NDEBUG.
Comment 9 Eric Seidel (no email) 2011-05-01 14:51:05 PDT
Comment on attachment 91234 [details]
Patch

We have an UNUSED() macro for this, no?
Comment 10 Alexis Menard (darktears) 2011-05-03 11:36:58 PDT
Created attachment 92095 [details]
Patch
Comment 11 Eric Seidel (no email) 2011-05-03 11:39:04 PDT
Comment on attachment 92095 [details]
Patch

OK.
Comment 12 WebKit Commit Bot 2011-05-03 23:09:00 PDT
Comment on attachment 92095 [details]
Patch

Clearing flags on attachment: 92095

Committed r85718: <http://trac.webkit.org/changeset/85718>
Comment 13 WebKit Commit Bot 2011-05-03 23:09:07 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 WebKit Commit Bot 2011-05-04 01:22:18 PDT
The commit-queue encountered the following flaky tests while processing attachment 92095 [details]:

http/tests/xmlhttprequest/cross-origin-no-authorization.html bug 33357 (author: ap@webkit.org)
The commit-queue is continuing to process your patch.