diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-06-03 15:28:25 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-08 22:50:03 +0000 |
commit | bc113abd53c02caa0e121bc0518fcfaba01929e9 (patch) | |
tree | 23fb3701c4d7625e026a302a1157b65a26974034 /common/fpsensor | |
parent | 8c8dc6f2287711bb839c9a61e9f254c2a3302f2d (diff) | |
download | chrome-ec-bc113abd53c02caa0e121bc0518fcfaba01929e9.tar.gz |
fpsensor: Fix g++ compiler error
When compiling the host tests, g++ warns about the following:
common/fpsensor/fpsensor.cc:491:25: error: comparison of integer
expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and
'int8_t' {aka 'signed char'} [-Werror=sign-compare]
491 | if (fgr == template_newly_enrolled) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
BRANCH=none
BUG=b:234181908, b:244781166
TEST=make host-fpsensor_crypto
TEST=./util/compare_build.sh -b fp -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ida17f6c123f6d73589774dd16ba60d0d54a8ee17
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3689786
Reviewed-by: Bobby Casey <bobbycasey@google.com>
Reviewed-by: Andrea Grandi <agrandi@google.com>
Diffstat (limited to 'common/fpsensor')
-rw-r--r-- | common/fpsensor/fpsensor.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/fpsensor/fpsensor.c b/common/fpsensor/fpsensor.c index 4ff77b6577..3e97741705 100644 --- a/common/fpsensor/fpsensor.c +++ b/common/fpsensor/fpsensor.c @@ -481,7 +481,11 @@ static enum ec_status fp_command_frame(struct host_cmd_handler_args *args) FP_CONTEXT_ENCRYPTION_SALT_BYTES); trng_exit(); - if (fgr == template_newly_enrolled) { + /* + * TODO(http://b/244781166): Use consistent types so cast is + * not needed. + */ + if (fgr == (uint32_t)template_newly_enrolled) { /* * Newly enrolled templates need new positive match * salt, new positive match secret and new validation |