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 <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
  • Loading branch information
addaleax authored and Trott committed Dec 19, 2019
1 parent 3e5967b commit ff5664b
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 @@ -943,7 +943,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 ff5664b

Please sign in to comment.