diff options
author | Chih-Hung Hsieh <chh@google.com> | 2016-06-10 15:09:00 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2016-06-21 11:21:38 -0700 |
commit | 711d51ceb2ed29be4328ada3bdb6fdd996dbe982 (patch) | |
tree | c172ff6286001298c6ace0d443064c5a17c2299c /brillo | |
parent | afdf519b294e29bb61aa643a7aa847f3960b6164 (diff) | |
download | libbrillo-711d51ceb2ed29be4328ada3bdb6fdd996dbe982.tar.gz |
Fix clang-tidy warnings in libbrillo
Add parentheses around macro arguments used beside operators.
Bug: 28705665
Change-Id: I7b11fdccc2e7e53f27842ae026d41358d08f8ab9
Diffstat (limited to 'brillo')
-rw-r--r-- | brillo/flag_helper.h | 2 | ||||
-rw-r--r-- | brillo/location_logging.h | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/brillo/flag_helper.h b/brillo/flag_helper.h index 47f7018..810a00c 100644 --- a/brillo/flag_helper.h +++ b/brillo/flag_helper.h @@ -204,7 +204,7 @@ class BRILLO_EXPORT StringFlag final : public Flag { // for defining bool flags #define DEFINE_bool(name, value, help) \ bool FLAGS_##name = value; \ - bool FLAGS_no##name = !value; \ + bool FLAGS_no##name = !(value); \ brillo::FlagHelper::GetInstance()->AddFlag( \ std::unique_ptr<brillo::Flag>(new brillo::BoolFlag( \ #name, &FLAGS_##name, &FLAGS_no##name, #value, help, true))); \ diff --git a/brillo/location_logging.h b/brillo/location_logging.h index bc3baf0..8e18c05 100644 --- a/brillo/location_logging.h +++ b/brillo/location_logging.h @@ -9,16 +9,16 @@ #include <base/logging.h> -#define VLOG_LOC_STREAM(from_here, verbose_level) \ - logging::LogMessage(from_here.file_name(), from_here.line_number(), \ - -verbose_level).stream() +#define VLOG_LOC_STREAM(from_here, verbose_level) \ + logging::LogMessage((from_here).file_name(), (from_here).line_number(), \ + -(verbose_level)).stream() -#define VLOG_LOC(from_here, verbose_level) \ - LAZY_STREAM(VLOG_LOC_STREAM(from_here, verbose_level), \ +#define VLOG_LOC(from_here, verbose_level) \ + LAZY_STREAM(VLOG_LOC_STREAM(from_here, verbose_level), \ VLOG_IS_ON(verbose_level)) -#define DVLOG_LOC(from_here, verbose_level) \ - LAZY_STREAM(VLOG_LOC_STREAM(from_here, verbose_level), \ +#define DVLOG_LOC(from_here, verbose_level) \ + LAZY_STREAM(VLOG_LOC_STREAM(from_here, verbose_level), \ ::logging::DEBUG_MODE && VLOG_IS_ON(verbose_level)) #endif // LIBBRILLO_BRILLO_LOCATION_LOGGING_H_ |