Warn on ignored return value from CheckedNumeric::AssignIfValid()
Adds a compiler warning that works in all compilation modes on Clang/GCC, and in Prefast on MSVC. The rationale is all other value-extracting CheckedNumeric<> functions already prevent the caller from ignoring the validity state, but without this change calling AssignIfValid() could silently ignore an invalid state. Change-Id: I7e16f3cf7f026151ef39215bfe01c05e7c58b32f Reviewed-on: https://chromium-review.googlesource.com/580296Reviewed-by:Erik Chen <erikchen@chromium.org> Commit-Queue: Justin Schuh <jschuh@chromium.org> Cr-Commit-Position: refs/heads/master@{#488707}
Showing
Please register or sign in to comment