• kmarshall's avatar
    Simplify ALLOW_UNUSED_LOCAL to use (void)x directly instead of conditionally. · d10bb7f7
    kmarshall authored
    Add ALLOW_UNUSED_LOCAL implementation for path-sensitive analyzers.
    The current definition of ALLOW_UNUSED_LOCAL uses "(void)x" to suppress
    warnings that "x" was never used, but places the expression in a
    never-executed codepath of a ternary expression, forcing this
    statement to be a no-op.
    
    Static analyzers which are codepath sensitive, like Clang's scan-build,
    will only trace along the no-op codepath and therefore will never
    evaluate the voidification clause. The result is a lot of warning noise
    like this:
    
    "warning: Value stored to 'x' during its initialization is never read"
    
    This CL removes the ternary expression from ALLOW_UNUSED_LOCAL so that the voidification statement is evaluated by path sensitive checkers. The build size was not affected by this change, therefore it's reasonable to assume that this won't have an effect on runtime behavior.
    
    R=pkasting@chromium.org
    CC=wez@chromium.org
    BUG=687243
    
    Review-Url: https://codereview.chromium.org/2838713002
    Cr-Commit-Position: refs/heads/master@{#467215}
    d10bb7f7
Name
Last commit
Last update
..
allocator Loading commit data...
android Loading commit data...
containers Loading commit data...
debug Loading commit data...
files Loading commit data...
i18n Loading commit data...
ios Loading commit data...
json Loading commit data...
mac Loading commit data...
memory Loading commit data...
message_loop Loading commit data...
metrics Loading commit data...
nix Loading commit data...
numerics Loading commit data...
posix Loading commit data...
power_monitor Loading commit data...
process Loading commit data...
profiler Loading commit data...
strings Loading commit data...
synchronization Loading commit data...
system_monitor Loading commit data...
task Loading commit data...
task_scheduler Loading commit data...
test Loading commit data...
third_party Loading commit data...
threading Loading commit data...
time Loading commit data...
timer Loading commit data...
trace_event Loading commit data...
win Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
at_exit.cc Loading commit data...
at_exit.h Loading commit data...
at_exit_unittest.cc Loading commit data...
atomic_ref_count.h Loading commit data...
atomic_sequence_num.h Loading commit data...
atomicops.h Loading commit data...
atomicops_internals_atomicword_compat.h Loading commit data...
atomicops_internals_portable.h Loading commit data...
atomicops_internals_x86_msvc.h Loading commit data...
atomicops_unittest.cc Loading commit data...
auto_reset.h Loading commit data...
barrier_closure.cc Loading commit data...
barrier_closure.h Loading commit data...
barrier_closure_unittest.cc Loading commit data...
base64.cc Loading commit data...
base64.h Loading commit data...
base64_unittest.cc Loading commit data...
base64url.cc Loading commit data...
base64url.h Loading commit data...
base64url_unittest.cc Loading commit data...
base_export.h Loading commit data...
base_paths.cc Loading commit data...
base_paths.h Loading commit data...
base_paths_android.cc Loading commit data...
base_paths_android.h Loading commit data...
base_paths_mac.h Loading commit data...
base_paths_mac.mm Loading commit data...
base_paths_posix.cc Loading commit data...
base_paths_posix.h Loading commit data...
base_paths_win.cc Loading commit data...
base_paths_win.h Loading commit data...
base_switches.cc Loading commit data...
base_switches.h Loading commit data...
big_endian.cc Loading commit data...
big_endian.h Loading commit data...
big_endian_unittest.cc Loading commit data...
bind.h Loading commit data...
bind_helpers.cc Loading commit data...
bind_helpers.h Loading commit data...
bind_helpers_unittest.cc Loading commit data...
bind_internal.h Loading commit data...
bind_unittest.cc Loading commit data...
bind_unittest.nc Loading commit data...
bit_cast.h Loading commit data...
bit_cast_unittest.cc Loading commit data...
bits.h Loading commit data...
bits_unittest.cc Loading commit data...
build_time.cc Loading commit data...
build_time.h Loading commit data...
build_time_unittest.cc Loading commit data...
callback.h Loading commit data...
callback_forward.h Loading commit data...
callback_helpers.cc Loading commit data...
callback_helpers.h Loading commit data...
callback_helpers_unittest.cc Loading commit data...
callback_internal.cc Loading commit data...
callback_internal.h Loading commit data...
callback_list.h Loading commit data...
callback_list_unittest.cc Loading commit data...
callback_list_unittest.nc Loading commit data...
callback_unittest.cc Loading commit data...
callback_unittest.nc Loading commit data...
cancelable_callback.h Loading commit data...
cancelable_callback_unittest.cc Loading commit data...
check_example.cc Loading commit data...
command_line.cc Loading commit data...
command_line.h Loading commit data...
command_line_unittest.cc Loading commit data...
compiler_specific.h Loading commit data...
cpu.cc Loading commit data...
cpu.h Loading commit data...
cpu_unittest.cc Loading commit data...
critical_closure.h Loading commit data...
critical_closure_internal_ios.mm Loading commit data...
deferred_sequenced_task_runner.cc Loading commit data...
deferred_sequenced_task_runner.h Loading commit data...
deferred_sequenced_task_runner_unittest.cc Loading commit data...
environment.cc Loading commit data...
environment.h Loading commit data...
environment_unittest.cc Loading commit data...
event_types.h Loading commit data...
feature_list.cc Loading commit data...
feature_list.h Loading commit data...
feature_list_unittest.cc Loading commit data...
file_descriptor_posix.h Loading commit data...
file_descriptor_store.cc Loading commit data...
file_descriptor_store.h Loading commit data...
file_version_info.h Loading commit data...
file_version_info_mac.h Loading commit data...
file_version_info_mac.mm Loading commit data...
file_version_info_win.cc Loading commit data...
file_version_info_win.h Loading commit data...
file_version_info_win_unittest.cc Loading commit data...
format_macros.h Loading commit data...
gmock_unittest.cc Loading commit data...
gtest_prod_util.h Loading commit data...
guid.cc Loading commit data...
guid.h Loading commit data...
guid_unittest.cc Loading commit data...
hash.cc Loading commit data...
hash.h Loading commit data...
hash_unittest.cc Loading commit data...
id_map.h Loading commit data...
id_map_unittest.cc Loading commit data...
lazy_instance.cc Loading commit data...
lazy_instance.h Loading commit data...
lazy_instance_unittest.cc Loading commit data...
linux_util.cc Loading commit data...
linux_util.h Loading commit data...
location.cc Loading commit data...
location.h Loading commit data...
logging.cc Loading commit data...
logging.h Loading commit data...
logging_unittest.cc Loading commit data...
logging_win.cc Loading commit data...
logging_win.h Loading commit data...
macros.h Loading commit data...
md5.cc Loading commit data...
md5.h Loading commit data...
md5_unittest.cc Loading commit data...
native_library.cc Loading commit data...
native_library.h Loading commit data...
native_library_ios.mm Loading commit data...
native_library_mac.mm Loading commit data...
native_library_posix.cc Loading commit data...
native_library_unittest.cc Loading commit data...
native_library_win.cc Loading commit data...
observer_list.h Loading commit data...
observer_list_threadsafe.h Loading commit data...
observer_list_unittest.cc Loading commit data...
optional.h Loading commit data...
optional_unittest.cc Loading commit data...
os_compat_android.cc Loading commit data...
os_compat_android.h Loading commit data...
os_compat_android_unittest.cc Loading commit data...
os_compat_nacl.cc Loading commit data...
os_compat_nacl.h Loading commit data...
path_service.cc Loading commit data...
path_service.h Loading commit data...
path_service_unittest.cc Loading commit data...
pending_task.cc Loading commit data...
pending_task.h Loading commit data...
pending_task_unittest.cc Loading commit data...
pickle.cc Loading commit data...
pickle.h Loading commit data...
pickle_unittest.cc Loading commit data...
post_task_and_reply_with_result_internal.h Loading commit data...
rand_util.cc Loading commit data...
rand_util.h Loading commit data...
rand_util_nacl.cc Loading commit data...
rand_util_posix.cc Loading commit data...
rand_util_unittest.cc Loading commit data...
rand_util_win.cc Loading commit data...
run_loop.cc Loading commit data...
run_loop.h Loading commit data...
run_loop_unittest.cc Loading commit data...
scoped_clear_errno.h Loading commit data...
scoped_clear_errno_unittest.cc Loading commit data...
scoped_generic.h Loading commit data...
scoped_generic_unittest.cc Loading commit data...
scoped_native_library.cc Loading commit data...
scoped_native_library.h Loading commit data...
scoped_native_library_unittest.cc Loading commit data...
scoped_observer.h Loading commit data...
security_unittest.cc Loading commit data...
sequence_checker.h Loading commit data...
sequence_checker_impl.cc Loading commit data...
sequence_checker_impl.h Loading commit data...
sequence_checker_unittest.cc Loading commit data...
sequence_token.cc Loading commit data...
sequence_token.h Loading commit data...
sequence_token_unittest.cc Loading commit data...
sequenced_task_runner.cc Loading commit data...
sequenced_task_runner.h Loading commit data...
sequenced_task_runner_helpers.h Loading commit data...
sequenced_task_runner_unittest.cc Loading commit data...
sha1.cc Loading commit data...
sha1.h Loading commit data...
sha1_unittest.cc Loading commit data...
single_thread_task_runner.h Loading commit data...
stl_util.h Loading commit data...
stl_util_unittest.cc Loading commit data...
supports_user_data.cc Loading commit data...
supports_user_data.h Loading commit data...
supports_user_data_unittest.cc Loading commit data...
sync_socket.h Loading commit data...
sync_socket_nacl.cc Loading commit data...
sync_socket_posix.cc Loading commit data...
sync_socket_unittest.cc Loading commit data...
sync_socket_win.cc Loading commit data...
sys_byteorder.h Loading commit data...
sys_byteorder_unittest.cc Loading commit data...
sys_info.cc Loading commit data...
sys_info.h Loading commit data...
sys_info_android.cc Loading commit data...
sys_info_chromeos.cc Loading commit data...
sys_info_freebsd.cc Loading commit data...
sys_info_internal.h Loading commit data...
sys_info_ios.mm Loading commit data...
sys_info_linux.cc Loading commit data...
sys_info_mac.mm Loading commit data...
sys_info_openbsd.cc Loading commit data...
sys_info_posix.cc Loading commit data...
sys_info_unittest.cc Loading commit data...
sys_info_win.cc Loading commit data...
syslog_logging.cc Loading commit data...
syslog_logging.h Loading commit data...
task_runner.cc Loading commit data...
task_runner.h Loading commit data...
task_runner_util.h Loading commit data...
task_runner_util_unittest.cc Loading commit data...
template_util.h Loading commit data...
template_util_unittest.cc Loading commit data...
tools_sanity_unittest.cc Loading commit data...
tracked_objects.cc Loading commit data...
tracked_objects.h Loading commit data...
tracked_objects_unittest.cc Loading commit data...
tracking_info.cc Loading commit data...
tracking_info.h Loading commit data...
tuple.h Loading commit data...
tuple_unittest.cc Loading commit data...
unguessable_token.cc Loading commit data...
unguessable_token.h Loading commit data...
unguessable_token_unittest.cc Loading commit data...
value_conversions.cc Loading commit data...
value_conversions.h Loading commit data...
values.cc Loading commit data...
values.h Loading commit data...
values_unittest.cc Loading commit data...
version.cc Loading commit data...
version.h Loading commit data...
version_unittest.cc Loading commit data...
vlog.cc Loading commit data...
vlog.h Loading commit data...
vlog_unittest.cc Loading commit data...