Commit 442ea3dd authored by Andre Przywara's avatar Andre Przywara Committed by David Gibson
Browse files

libfdt: fdt_offset_ptr(): Fix comparison warnings



With -Wsign-compare, compilers warn about mismatching signedness in
comparisons in fdt_offset_ptr().

This mostly stems from "offset" being passed in as a signed integer,
even though the function would not really tolerate negative values.

Short of changing the prototype, check that offset is not negative, and
use an unsigned type internally.

Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
Message-Id: <20200921165303.9115-2-andre.przywara@arm.com>
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent ca19c3db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment