From a277d03c3310a7fe583574d945c95992eeda78d5 Mon Sep 17 00:00:00 2001 From: Craig Smith Date: Mon, 21 Jan 2019 16:31:25 -0600 Subject: [PATCH] Fix unused var warnings. --- source/core/Events.cpp | 4 ++-- source/core/JavaScriptRef.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/core/Events.cpp b/source/core/Events.cpp index 43ec12d10..2eaa87d57 100644 --- a/source/core/Events.cpp +++ b/source/core/Events.cpp @@ -1235,6 +1235,7 @@ VIREO_FUNCTION_SIGNATURE2(RegisterForJSEvent, JavaScriptRefNum, UInt32) THREAD_EXEC()->LogEvent(EventLog::kSoftDataError, "JavaScriptRefNum must not be null"); return THREAD_EXEC()->Stop(); } +#if kVireoOS_emscripten UInt32 eventType = _Param(1); VirtualInstrument *owningVI = THREAD_CLUMP()->OwningVI(); STACK_VAR(String, viNameVar); @@ -1248,10 +1249,9 @@ VIREO_FUNCTION_SIGNATURE2(RegisterForJSEvent, JavaScriptRefNum, UInt32) eventOracleIdx = ecInfo->eventOracleIndex; controlID = ecInfo->controlID; -#if kVireoOS_emscripten jsRegisterForControlEvent(viName, controlID, eventType, eventOracleIdx); -#endif } +#endif return _NextInstruction(); } diff --git a/source/core/JavaScriptRef.cpp b/source/core/JavaScriptRef.cpp index 5db14214d..0bd6262cf 100644 --- a/source/core/JavaScriptRef.cpp +++ b/source/core/JavaScriptRef.cpp @@ -26,15 +26,15 @@ extern "C" { VIREO_FUNCTION_SIGNATURE2(IsNotAJavaScriptRefnum, JavaScriptRefNum, Boolean) { + Boolean isNotARefnum = false; + JavaScriptRefNum* refnumPtr = _ParamPointer(0); +#if kVireoOS_emscripten TypeRef typeRefJavaScriptRefNum = TypeManagerScope::Current()->FindType(tsJavaScriptRefNumType); TypeRef typeRefIsNotARefNum = TypeManagerScope::Current()->FindType(tsBooleanType); - JavaScriptRefNum* refnumPtr = _ParamPointer(0); - Boolean isNotARefnum = false; - #if kVireoOS_emscripten jsIsNotAJavaScriptRefnum(typeRefJavaScriptRefNum, refnumPtr, typeRefIsNotARefNum, &isNotARefnum); - #else +#else isNotARefnum = *refnumPtr == 0; - #endif +#endif _Param(1) = isNotARefnum; return _NextInstruction(); }