From 21d4a5266f8f4ce4fe7eebcc9dc4e14068e4d487 Mon Sep 17 00:00:00 2001 From: George Stagg Date: Fri, 20 Mar 2026 15:15:33 +0000 Subject: [PATCH] Fix warnings/errors in wasm sysroot --- ggsql-wasm/demo/package-lock.json | 2 +- .../bindings/rust/wasm-sysroot/src/stdio.c | 10 ++++++++++ .../bindings/rust/wasm-sysroot/src/stdlib.c | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ggsql-wasm/demo/package-lock.json b/ggsql-wasm/demo/package-lock.json index 2b2658ea..390e98a1 100644 --- a/ggsql-wasm/demo/package-lock.json +++ b/ggsql-wasm/demo/package-lock.json @@ -24,7 +24,7 @@ }, "../pkg": { "name": "ggsql-wasm", - "version": "0.1.0", + "version": "0.1.8", "license": "MIT" }, "node_modules/@esbuild/aix-ppc64": { diff --git a/tree-sitter-ggsql/bindings/rust/wasm-sysroot/src/stdio.c b/tree-sitter-ggsql/bindings/rust/wasm-sysroot/src/stdio.c index 470c1ecc..e9031a0b 100644 --- a/tree-sitter-ggsql/bindings/rust/wasm-sysroot/src/stdio.c +++ b/tree-sitter-ggsql/bindings/rust/wasm-sysroot/src/stdio.c @@ -275,25 +275,35 @@ int vsnprintf(char *restrict buffer, size_t buffsz, const char *restrict format, } int fclose(FILE *stream) { + (void)stream; return 0; } FILE* fdopen(int fd, const char *mode) { + (void)fd; + (void)mode; return 0; } int fputc(int c, FILE *stream) { + (void)stream; return c; } int fputs(const char *restrict str, FILE *restrict stream) { + (void)str; + (void)stream; return 0; } size_t fwrite(const void *restrict buffer, size_t size, size_t nmemb, FILE *restrict stream) { + (void)buffer; + (void)stream; return size * nmemb; } int fprintf(FILE *restrict stream, const char *restrict format, ...) { + (void)stream; + (void)format; return 0; } diff --git a/tree-sitter-ggsql/bindings/rust/wasm-sysroot/src/stdlib.c b/tree-sitter-ggsql/bindings/rust/wasm-sysroot/src/stdlib.c index 9719e254..0a451073 100644 --- a/tree-sitter-ggsql/bindings/rust/wasm-sysroot/src/stdlib.c +++ b/tree-sitter-ggsql/bindings/rust/wasm-sysroot/src/stdlib.c @@ -15,7 +15,7 @@ extern void tree_sitter_debug_message(const char *, size_t); #define PAGESIZE 0x10000 #define MAX_HEAP_SIZE (1024 * 1024 * 1024) -typedef struct { +typedef struct Region { size_t size; struct Region *next; char data[0];