From be66cc88acebe87e175659df1afc2e4586ed8958 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Thu, 18 Jul 2024 14:31:27 -0700 Subject: Enable warnings-as-error for CI (#4659) Enable warnings-as-error for CI Closes #4664. Uses glslang commit that fixed a compiler warning Fixes a recent warning from external/CMakelist.txt A new macro, `SLANG_MAYBE_UNUSED` is added for a future need. --- include/slang.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/slang.h b/include/slang.h index 86ca4649b..76743a426 100644 --- a/include/slang.h +++ b/include/slang.h @@ -326,6 +326,12 @@ convention for interface methods. # define SLANG_UNUSED(v) (void)v; #endif +#if defined(__llvm__) +# define SLANG_MAYBE_UNUSED [[maybe_unused]] +#else +# define SLANG_MAYBE_UNUSED +#endif + // Used for doing constant literals #ifndef SLANG_INT64 # define SLANG_INT64(x) (x##ll) -- cgit v1.2.3