Skip to content

Commit

Permalink
src: silence compiler warning in node_report.cc
Browse files Browse the repository at this point in the history
Currently the following compiler warnings is generated:
../src/node_report.cc:778:43:
warning: format specifies type 'unsigned long' but the argument has
type 'rlim_t' (aka 'unsigned long long') [-Wformat]
        snprintf(buf, sizeof(buf), "%lu", limit.rlim_max);
                                    ~~~   ^~~~~~~~~~~~~~
                                    %llu
1 warning generated.

This commit changes the format specifier to $llu.

PR-URL: #25557
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
danbev authored and targos committed Jan 24, 2019
1 parent 0800f91 commit 8f42c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_report.cc
Original file line number Diff line number Diff line change
@@ -775,7 +775,7 @@ static void PrintSystemInformation(JSONWriter* writer) {
snprintf(buf, sizeof(buf), "%lu", limit.rlim_max);
hard = std::string(buf);
#else
snprintf(buf, sizeof(buf), "%lu", limit.rlim_max);
snprintf(buf, sizeof(buf), "%llu", limit.rlim_max);
hard = std::string(buf);
#endif
}

0 comments on commit 8f42c9e

Please sign in to comment.