Skip to content

Commit

Permalink
Add warning as error to EMCC build
Browse files Browse the repository at this point in the history
  • Loading branch information
Changqing-JING committed Jan 18, 2024
1 parent 5a7adc1 commit d59d079
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ jobs:
run: |
docker run -di --name emscripten -v $(pwd):/src emscripten/emsdk:latest bash
docker exec emscripten emcc -v
docker exec emscripten emcmake cmake .
docker exec emscripten make -j 2 VERBOSE=1
docker exec emscripten emcmake cmake -B emscripten -DWERROR=ON -DBUILD_TESTS=OFF
docker exec emscripten bash -c "cd /src/emscripten && make -j $(nproc)"
wasi:
name: wasi
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion src/c-writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ void CWriter::SerializeFuncType(const FuncType& func_type,
*next_byte++ = MangleType(func_type.GetResultType(i));
}

assert(next_byte - mangled_signature == len);
assert(next_byte - mangled_signature == static_cast<ptrdiff_t>(len));

// step 4: SHA-256 the whole string
sha256({mangled_signature, len}, serialized_type);
Expand Down
2 changes: 2 additions & 0 deletions wasm2c/wasm-rt-impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ static void os_cleanup_signal_handler(void) {
#endif

#else
#if WASM_RT_USE_MMAP
static void* os_mmap(size_t size) {
int map_prot = PROT_NONE;
int map_flags = MAP_ANONYMOUS | MAP_PRIVATE;
Expand All @@ -168,6 +169,7 @@ static int os_mprotect(void* addr, size_t size) {
static void os_print_last_error(const char* msg) {
perror(msg);
}
#endif

#if WASM_RT_INSTALL_SIGNAL_HANDLER
static void os_signal_handler(int sig, siginfo_t* si, void* unused) {
Expand Down

0 comments on commit d59d079

Please sign in to comment.