From 39d8fd2161d0a505c5b25add023aad833714b980 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Tue, 22 Apr 2025 15:06:50 -0600 Subject: Use C23 This gives us: - [[maybe_unused]] instead of [[gnu::unused]] - bool/true/false are predefined, so no need for --- lib9p/core_gen/c_unmarshal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib9p/core_gen/c_unmarshal.py') diff --git a/lib9p/core_gen/c_unmarshal.py b/lib9p/core_gen/c_unmarshal.py index 1afbe1d..206a85b 100644 --- a/lib9p/core_gen/c_unmarshal.py +++ b/lib9p/core_gen/c_unmarshal.py @@ -123,9 +123,9 @@ def gen_c_unmarshal(versions: set[str], typs: list[idl.UserType]) -> str: assert isinstance(typ, idl.Struct) ret += "\n" ret += cutil.ifdef_push(1, c9util.ver_ifdef(typ.in_versions)) - ret += f"static void unmarshal_{typ.typname}([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *net_bytes, void *out_buf) {{\n" + ret += f"static void unmarshal_{typ.typname}([[maybe_unused]] struct lib9p_ctx *ctx, uint8_t *net_bytes, void *out_buf) {{\n" ret += f"\t{c9util.typename(typ)} *out = out_buf;\n" - ret += "\t[[gnu::unused]] void *extra = &out[1];\n" + ret += "\t[[maybe_unused]] void *extra = &out[1];\n" ret += "\tuint32_t net_offset = 0;\n" indent_stack = [IndentLevel(ifdef=True)] -- cgit v1.2.3-2-g168b