Skip to content
Permalink
Browse files

src: fix compiler warning in env.cc

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 BridgeAR committed Dec 18, 2019
1 parent a386114 commit e5a41552e649d46faee675aeaa130ca17466da6f
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/env.cc
@@ -946,7 +946,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(

0 comments on commit e5a4155

Please sign in to comment.
You can’t perform that action at this time.