When `STRIP_LOG` is off, the internal variable `absl_log_internal_check_op_result` is passed to `absl::log_internal::LogMessageFatal()` and used in the failure message. When `STRIP_LOG` is on, the variable is truly unused. Applying a `ABSL_ATTRIBUTE_UNUSED` on the variable triggers `-Wused-but-marked-unused` when `STRIP_LOG` is off, not applying the attribute triggers `-Wunused-but-set-variable` when `STRIP_LOG` is on. Define a new internal macro `ABSL_LOG_INTERNAL_ATTRIBUTE_UNUSED_IF_STRIP_LOG` that evaluates to `ABSL_ATTRIBUTE_UNUSED` when `STRIP_LOG` is on and nothing when `STRIP_LOG` is off to address both of these scenarios. PiperOrigin-RevId: 625049155 Change-Id: Ia3f8a6ca916dd67a287bbda4b9bd6c574c92247a
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| BUILD.bazel | Loading commit data... | |
| append_truncated.h | Loading commit data... | |
| check_impl.h | Loading commit data... | |
| check_op.cc | Loading commit data... | |
| check_op.h | Loading commit data... | |
| conditions.cc | Loading commit data... | |
| conditions.h | Loading commit data... | |
| config.h | Loading commit data... | |
| flags.h | Loading commit data... | |
| fnmatch.cc | Loading commit data... | |
| fnmatch.h | Loading commit data... | |
| fnmatch_benchmark.cc | Loading commit data... | |
| fnmatch_test.cc | Loading commit data... | |
| globals.cc | Loading commit data... | |
| globals.h | Loading commit data... | |
| log_format.cc | Loading commit data... | |
| log_format.h | Loading commit data... | |
| log_impl.h | Loading commit data... | |
| log_message.cc | Loading commit data... | |
| log_message.h | Loading commit data... | |
| log_sink_set.cc | Loading commit data... | |
| log_sink_set.h | Loading commit data... | |
| nullguard.cc | Loading commit data... | |
| nullguard.h | Loading commit data... | |
| nullstream.h | Loading commit data... | |
| proto.cc | Loading commit data... | |
| proto.h | Loading commit data... | |
| stderr_log_sink_test.cc | Loading commit data... | |
| strip.h | Loading commit data... | |
| structured.h | Loading commit data... | |
| test_actions.cc | Loading commit data... | |
| test_actions.h | Loading commit data... | |
| test_helpers.cc | Loading commit data... | |
| test_helpers.h | Loading commit data... | |
| test_matchers.cc | Loading commit data... | |
| test_matchers.h | Loading commit data... | |
| vlog_config.cc | Loading commit data... | |
| vlog_config.h | Loading commit data... | |
| vlog_config_benchmark.cc | Loading commit data... | |
| voidify.h | Loading commit data... |