summaryrefslogtreecommitdiff
path: root/src/prebuilt/wasm2c.include.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2022-03-02 19:28:56 -0800
committerGitHub <noreply@github.com>2022-03-02 19:28:56 -0800
commit1c8efb359749c40cbe31f49af9459e2fdf48b5a8 (patch)
tree946976f49c4e9511e053fe97a27d0cbaacf2cca9 /src/prebuilt/wasm2c.include.h
parentb1ea4ad34e942f6bc42b156e21634f0871027704 (diff)
downloadwabt-1c8efb359749c40cbe31f49af9459e2fdf48b5a8.tar.gz
wabt-1c8efb359749c40cbe31f49af9459e2fdf48b5a8.tar.bz2
wabt-1c8efb359749c40cbe31f49af9459e2fdf48b5a8.zip
Fix compiler warnings in wasm2c output (#1844)
Use stricter compiler settings and fix the resulting warnings. This is precursor to landing windows compiler support for wasm2c. See #1843.
Diffstat (limited to 'src/prebuilt/wasm2c.include.h')
-rw-r--r--src/prebuilt/wasm2c.include.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/prebuilt/wasm2c.include.h b/src/prebuilt/wasm2c.include.h
index 4ba24751..97d4aea5 100644
--- a/src/prebuilt/wasm2c.include.h
+++ b/src/prebuilt/wasm2c.include.h
@@ -18,6 +18,8 @@ const char SECTION_NAME(top)[] =
"#define WASM_RT_ADD_PREFIX(x) WASM_RT_PASTE(WASM_RT_MODULE_PREFIX, x)\n"
"\n"
"/* TODO(binji): only use stdint.h types in header */\n"
+"#ifndef WASM_RT_CORE_TYPES_DEFINED\n"
+"#define WASM_RT_CORE_TYPES_DEFINED\n"
"typedef uint8_t u8;\n"
"typedef int8_t s8;\n"
"typedef uint16_t u16;\n"
@@ -28,6 +30,7 @@ const char SECTION_NAME(top)[] =
"typedef int64_t s64;\n"
"typedef float f32;\n"
"typedef double f64;\n"
+"#endif\n"
"\n"
"extern void WASM_RT_ADD_PREFIX(init)(void);\n"
;