wasm: fix null-argument warning

That's "null passed to a callee that requires a non-null argument".

Pass EMSCRIPTEN_EVENT_TARGET_WINDOW instead of NULL to
emscripten_set_wheel_callback. The function is never called
here, so it does not matter which non-null value it
gets.

Pick-to: 6.6
Change-Id: I10187a222513820158a938bf05cde60f489956f1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
bb10
Morten Sørvig 2023-08-16 22:05:34 +02:00
parent 58a6a92f68
commit 73feb5184e
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ static void usePotentialyUnusedSymbols()
// called at runtime.
volatile bool doIt = false;
if (doIt)
emscripten_set_wheel_callback("", 0, 0, NULL);
emscripten_set_wheel_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, 0, 0, NULL);
}
Q_CONSTRUCTOR_FUNCTION(usePotentialyUnusedSymbols)