bvb_refimpl: fix pointer-to-int-cast compiler error

Error:
.../brillo/system/bvb/refimpl/bvb_verify.c:168:27:
error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
   if (!bvb_safe_add(NULL, (uint64_t) data, length)) {
                           ^

The error means that converting a pointer to unsigned int can be
dangerous.

We converts a pointer to 64bit unsigned int which is safe (at
least till we are not going to run this code on 128bit system for
example)
We can make compiler happy by useing uintptr_t as a temp variable.
uintptr_t is guaranteed to be wide enough that converting a pointer
to uintptr_t and back again will yield the original pointer value.

Change-Id: Id94e83942bd2f63fdbd9f8da04d2d4a5892e26c2
Signed-off-by: Dzmitry Yatsushkevich <dmitryya@nestlabs.com>
1 file changed