From 0559a98f91120f020f600aa8e52881f54b6e62ff Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sun, 20 Nov 2016 12:19:31 +0000 Subject: [PATCH] fix -Wsign-compare warnings (#369) Fix repeated errors like this: log_format.hh:1138:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len < jfe.jfe_min_width) { Fixes #369. https://github.com/tstack/lnav/issues/369 --- src/log_format.hh | 4 ++-- src/yajlpp.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/log_format.hh b/src/log_format.hh index e27a341d..c3cfc892 100644 --- a/src/log_format.hh +++ b/src/log_format.hh @@ -1018,8 +1018,8 @@ public: json_log_field jfe_type; intern_string_t jfe_value; std::string jfe_default_value; - long long jfe_min_width; - long long jfe_max_width; + unsigned long long jfe_min_width; + unsigned long long jfe_max_width; align_t jfe_align; overflow_t jfe_overflow; std::string jfe_ts_format; diff --git a/src/yajlpp.hh b/src/yajlpp.hh index 957fa6e5..c2e871e9 100644 --- a/src/yajlpp.hh +++ b/src/yajlpp.hh @@ -273,7 +273,7 @@ struct json_path_handler : public json_path_handler_base { return *this; }; - json_path_handler &for_field(long long *field) { + json_path_handler &for_field(unsigned long long *field) { this->add_cb(yajlpp_static_number); this->jph_simple_offset = field; this->jph_validator = yajlpp_validator_for_int;