Skip to content

Commit

Permalink
src: fix compiler warning in env.cc
Browse files Browse the repository at this point in the history
This fixes the following warning:

    ../src/env.cc: In member function ‘void node::Environment::Exit(int)’:
    ../src/env.cc:946:77: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
           fprintf(stderr, "(node:%d, thread:%llu) ", uv_os_getpid(), thread_id());
                                                                      ~~~~~~~~~~~^

PR-URL: #31020
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
  • Loading branch information
addaleax authored and BethGriggs committed Feb 6, 2020
1 parent d3c9695 commit 91b72b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,8 @@ void Environment::Exit(int exit_code) {
if (is_main_thread()) {
fprintf(stderr, "(node:%d) ", uv_os_getpid());
} else {
fprintf(stderr, "(node:%d, thread:%llu) ", uv_os_getpid(), thread_id());
fprintf(stderr, "(node:%d, thread:%" PRIu64 ") ",
uv_os_getpid(), thread_id());
}

fprintf(
Expand Down

0 comments on commit 91b72b3

Please sign in to comment.