George Burgess has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83412?usp=email )
Change subject: amdfwtool: adjust sign of constant ......................................................................
amdfwtool: adjust sign of constant
This constant is used in a single place; its use triggers one of Clang's warnings, which may be promoted to an error: ``` amdfwtool.c:1487:27: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] 1487 | amd_romsig->efs_gen.gen = EFS_BEFORE_SECOND_GEN; ```
`efs_gen.gen` is a 1-bit `int`, so the two values it can have are -1 and 0. Reflect that in the constant.
TEST=Rebuilt coreboot; no warning was emitted.
Change-Id: Ibd83be8302e8a717db7e7dc86a403b5648976586 Signed-off-by: George Burgess IV gbiv@google.com --- M util/amdfwtool/amdfwtool.h 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/83412/1
diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h index 1dc445c..6d1157d 100644 --- a/util/amdfwtool/amdfwtool.h +++ b/util/amdfwtool/amdfwtool.h @@ -148,7 +148,7 @@ } __attribute__((packed));
#define EFS_SECOND_GEN 0 -#define EFS_BEFORE_SECOND_GEN 1 +#define EFS_BEFORE_SECOND_GEN -1
typedef struct _embedded_firmware { uint32_t signature; /* 0x55aa55aa */