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

libfdt: fdt_move(): Fix comparison warnings



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

This stems from "bufsize" being passed in as a signed integer, even
though we would expect a buffer size to be positive.

Short of changing the prototype, check that bufsize is not negative, and
cast it to an unsigned type in the comparison.

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