Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
src: silence compiler warning in node_report.cc
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.
  • Loading branch information
danbev committed Jan 18, 2019
commit f13385ae40090efd79ef6fb558fc10a88b328c25
2 changes: 1 addition & 1 deletion src/node_report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down