From 14259b79dc78fa004d5cbb98b23308f69f8867b3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 15 Apr 2026 15:46:02 -0600 Subject: [PATCH] [util/gpu/web] Silence "empty character constant" warnings EM_ASM stringifies its body, but the C tokenizer still parses single-quoted '' as an empty char constant. Use double-quoted "" -- valid JS empty string, no warning. Assisted-by: Claude Opus 4.6 (1M context) --- util/gpu/web/hb-gpu-web-webgpu.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/gpu/web/hb-gpu-web-webgpu.cc b/util/gpu/web/hb-gpu-web-webgpu.cc index b955e3d6b..986173dc1 100644 --- a/util/gpu/web/hb-gpu-web-webgpu.cc +++ b/util/gpu/web/hb-gpu-web-webgpu.cc @@ -766,7 +766,7 @@ on_adapter (WGPURequestAdapterStatus status, window._webgpuError = true; var el = document.getElementById ('loading'); if (el) { - el.style.display = ''; + el.style.display = ""; var html = 'WebGPU adapter not available.
' + 'Browser support status'; @@ -1040,7 +1040,7 @@ main (int argc, char **argv) window._webgpuError = true; var el = document.getElementById ('loading'); if (el) { - el.style.display = ''; + el.style.display = ""; el.innerHTML = 'WebGPU is not available in this browser.
' + 'Try the WebGL version'; el.style.font = '18px sans-serif';