From c99bd4a6c991d7cd9d9cc3ffabb1a0a63e21c83f Mon Sep 17 00:00:00 2001 From: Felix Held Date: Fri, 18 Sep 2020 16:00:40 +0200 Subject: util/cbfstool/fmd: make flashmap_flags bitfield struct elements unsigned One bit wide bitfields should always be unsigned, since they can only be either 0 or -1, but never 1 which is assigned to that bit field in some cases. Making this unsigned allows it to have the values 0 or 1 which is what we want there. BUG=b:157068645 BRANCH=zork Change-Id: I99c236df583528848b455ef424504e6c2a33c5d6 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/45593 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh --- util/cbfstool/fmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/cbfstool/fmd.h b/util/cbfstool/fmd.h index 8dfcb3c964..18463ff6d1 100644 --- a/util/cbfstool/fmd.h +++ b/util/cbfstool/fmd.h @@ -19,8 +19,8 @@ */ union flashmap_flags { struct { - int cbfs: 1; /* The section contains a CBFS area. */ - int preserve: 1; /* Preserve the section before update. */ + unsigned int cbfs: 1; /* The section contains a CBFS area. */ + unsigned int preserve: 1; /* Preserve the section before update. */ } f; int v; }; -- cgit v1.2.3