diff options
Diffstat (limited to 'lib9p/core_gen')
-rw-r--r-- | lib9p/core_gen/c.py | 5 | ||||
-rw-r--r-- | lib9p/core_gen/c_unmarshal.py | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib9p/core_gen/c.py b/lib9p/core_gen/c.py index b0ff871..393766b 100644 --- a/lib9p/core_gen/c.py +++ b/lib9p/core_gen/c.py @@ -23,7 +23,6 @@ def gen_c(versions: set[str], typs: list[idl.UserType]) -> str: ret = f"""/* Generated by `{' '.join(sys.argv)}`. DO NOT EDIT! */ -#include <stdbool.h> #include <stddef.h> /* for size_t */ #include <inttypes.h> /* for PRI* macros */ #include <string.h> /* for memset() */ @@ -36,9 +35,9 @@ def gen_c(versions: set[str], typs: list[idl.UserType]) -> str: #include "core_tables.h" #include "core_utf8.h" """ - # libobj vtables ########################################################### + # libmisc/obj.h vtables #################################################### ret += """ -/* libobj vtables *************************************************************/ +/* libmisc/obj.h vtables ******************************************************/ """ for typ in typs: ret += cutil.ifdef_push(1, c9util.ver_ifdef(typ.in_versions)) 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)] |