Bug 161252 - REGRESSION(r204028): Fix unused-but-set-variable warning in generated JSNavigator.cpp
Summary: REGRESSION(r204028): Fix unused-but-set-variable warning in generated JSNavig...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 160394
  Show dependency treegraph
 
Reported: 2016-08-26 09:20 PDT by Csaba Osztrogonác
Modified: 2016-08-26 17:17 PDT (History)
11 users (show)

See Also:


Attachments
Patch (13.42 KB, patch)
2016-08-26 10:28 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2016-08-26 09:20:50 PDT
DerivedSources/WebCore/JSNavigator.cpp: In function 'JSC::EncodedJSValue WebCore::jsNavigatorPrototypeFunctionVibrate(JSC::ExecState*)':
DerivedSources/WebCore/JSNavigator.cpp:977:17: error: variable 'distinguishingArg' set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors

-------------------------------------------------------------------------------------------------------------------
EncodedJSValue JSC_HOST_CALL jsNavigatorPrototypeFunctionVibrate(ExecState* state)
{
    size_t argsCount = std::min<size_t>(1, state->argumentCount());
    if (argsCount == 1) {
        JSValue distinguishingArg = state->uncheckedArgument(0);
#if ENABLE(VIBRATION)
        if (hasIteratorMethod(*state, distinguishingArg))
            return jsNavigatorPrototypeFunctionVibrate1(state);
#endif
#if ENABLE(VIBRATION)
        if (distinguishingArg.isNumber())
            return jsNavigatorPrototypeFunctionVibrate2(state);
#endif
#if ENABLE(VIBRATION)
        return jsNavigatorPrototypeFunctionVibrate2(state);
#endif
    }
    return argsCount < 1 ? throwVMError(state, createNotEnoughArgumentsError(state)) : throwVMTypeError(state);
}
-------------------------------------------------------------------------------------------------------------------
Comment 1 Csaba Osztrogonác 2016-08-26 09:27:47 PDT
It seems it is a regression caused by https://trac.webkit.org/changeset/204028
Comment 2 Chris Dumez 2016-08-26 10:28:34 PDT
Created attachment 287118 [details]
Patch
Comment 3 WebKit Commit Bot 2016-08-26 14:36:08 PDT
Comment on attachment 287118 [details]
Patch

Clearing flags on attachment: 287118

Committed r205048: <http://trac.webkit.org/changeset/205048>
Comment 4 WebKit Commit Bot 2016-08-26 14:36:25 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Chris Dumez 2016-08-26 17:17:51 PDT
Follow-up fix in <http://trac.webkit.org/changeset/205061>.