[Webkit-unassigned] [Bug 161252] New: Fix unused-but-set-variable warning in generated JSNavigator.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 26 09:20:50 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=161252

            Bug ID: 161252
           Summary: Fix unused-but-set-variable warning in generated
                    JSNavigator.cpp
    Classification: Unclassified
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ossy at webkit.org

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);
}
-------------------------------------------------------------------------------------------------------------------

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160826/d7ccf284/attachment-0001.html>


More information about the webkit-unassigned mailing list