diff options
author | Denis Brockus <dbrockus@google.com> | 2021-07-27 15:18:27 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-27 22:23:55 +0000 |
commit | a1500ff6ae4c32859b962d45d865967ca9cfee52 (patch) | |
tree | 6eaf2c67d46b1e380c0ed4c7e43bceb69bc158a0 /common | |
parent | c1d7b514a13a1c794fefdaeac2cc23e2b7be50b4 (diff) | |
download | chrome-ec-a1500ff6ae4c32859b962d45d865967ca9cfee52.tar.gz |
common: vboot_hash: cast UL to uintptr_t to remove warning
CONFIG_MAPPED_STORAGE_BASE is an unsigned long and this
kicks back a warning from zephyr builds. So cast it to
the uintptr_t to make sure it is the right size.
BUG=none
BRANCH=none
TEST=zmake configure -b $PROJ_HAYATO
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I841025776c4520708ae1a773df27b980594c36d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3057731
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/vboot_hash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/vboot_hash.c b/common/vboot_hash.c index ea32bbe680..33172e7c74 100644 --- a/common/vboot_hash.c +++ b/common/vboot_hash.c @@ -14,6 +14,7 @@ #include "sha256.h" #include "shared_mem.h" #include "stdbool.h" +#include "stdint.h" #include "system.h" #include "task.h" #include "timer.h" @@ -116,8 +117,9 @@ static void hash_next_chunk(size_t size) { #ifdef CONFIG_MAPPED_STORAGE crec_flash_lock_mapped_storage(1); - SHA256_update(&ctx, (const uint8_t *)(CONFIG_MAPPED_STORAGE_BASE + - data_offset + curr_pos), size); + SHA256_update(&ctx, (const uint8_t *) + ((uintptr_t)CONFIG_MAPPED_STORAGE_BASE + + data_offset + curr_pos), size); crec_flash_lock_mapped_storage(0); #else if (read_and_hash_chunk(data_offset + curr_pos, size) != EC_SUCCESS) |