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 <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45593
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
Felix Held 2020-09-18 16:00:40 +02:00
parent c521d1587c
commit c99bd4a6c9
1 changed files with 2 additions and 2 deletions

View File

@ -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;
};