mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-14 00:37:41 -04:00
libfdt: fdt_grab_space_(): Fix comparison warning
With -Wsign-compare, compilers warn about a mismatching signedness in a comparison in fdt_grab_space_(). All the involved values cannot be negative, so let's switch the types of the local variables to unsigned to make the compiler happy. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Message-Id: <20200921165303.9115-4-andre.przywara@arm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
0c43d4d7bf
commit
f8e11e6162
1 changed files with 2 additions and 2 deletions
|
@ -93,8 +93,8 @@ static inline uint32_t sw_flags(void *fdt)
|
||||||
|
|
||||||
static void *fdt_grab_space_(void *fdt, size_t len)
|
static void *fdt_grab_space_(void *fdt, size_t len)
|
||||||
{
|
{
|
||||||
int offset = fdt_size_dt_struct(fdt);
|
unsigned int offset = fdt_size_dt_struct(fdt);
|
||||||
int spaceleft;
|
unsigned int spaceleft;
|
||||||
|
|
||||||
spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt)
|
spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt)
|
||||||
- fdt_size_dt_strings(fdt);
|
- fdt_size_dt_strings(fdt);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue