Skip to content

Commit

Permalink
Merge pull request #11 from toyobayashi/fix-unused-var
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Dec 14, 2022
2 parents 0fb5eb0 + b648530 commit c47aab9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/emnapi/src/emnapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ napi_status napi_adjust_external_memory(napi_env env,
}

size_t old_size = emscripten_get_heap_size();
int r = emscripten_resize_heap(old_size + (size_t) change_in_bytes);
if (!emscripten_resize_heap(old_size + (size_t) change_in_bytes)) {
return napi_set_last_error(env, napi_generic_failure, 0, NULL);
}

*adjusted_value = (int64_t) emscripten_get_heap_size();

Expand Down
1 change: 0 additions & 1 deletion packages/emnapi/src/uv/unix/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ int uv_thread_create_ex(uv_thread_t* tid,
void (*entry)(void *arg),
void *arg) {
int err;
pthread_attr_t attr_storage;

/* Used to squelch a -Wcast-function-type warning. */
union {
Expand Down
2 changes: 1 addition & 1 deletion packages/emnapi/src/uv/uv-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ uv_loop_t* uv_default_loop(void) {
}

int uv_loop_close(uv_loop_t* loop) {
QUEUE* q;
// QUEUE* q;
// uv_handle_t* h;
#ifndef NDEBUG
void* saved_data;
Expand Down
1 change: 1 addition & 0 deletions packages/test/cgen.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = function (_options, { isDebug, isEmscripten }) {
const compilerFlags = isEmscripten
? [
// ...(isDebug ? ['-sDISABLE_EXCEPTION_CATCHING=0'] : [])
...(isDebug ? ['-Wall'] : []),
...(process.env.MEMORY64 ? ['-sMEMORY64=1'] : [])
]
: []
Expand Down

0 comments on commit c47aab9

Please sign in to comment.