Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32185
Change subject: libpayload: Enable -Wconversion ......................................................................
libpayload: Enable -Wconversion
Together with -Werror this ensures that no new conversion related issues can appear.
BUG=b:111443775 BRANCH=none TEST=make junit.xml has no failed builds
Change-Id: Idc37c50cae90d283bd6ec240dd7de3546485a9a9 Signed-off-by: Patrick Georgi pgeorgi@google.com --- M payloads/libpayload/Makefile.inc 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/32185/1
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc index 7787762..ceac4ca 100644 --- a/payloads/libpayload/Makefile.inc +++ b/payloads/libpayload/Makefile.inc @@ -64,7 +64,7 @@ CFLAGS += -ffunction-sections -fdata-sections CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs -CFLAGS += -Wstrict-aliasing -Wshadow -Werror +CFLAGS += -Wstrict-aliasing -Wshadow -Werror -Wconversion
$(obj)/libpayload-config.h: $(KCONFIG_AUTOHEADER) cmp $@ $< 2>/dev/null || cp $< $@
Stefan Reinauer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32185 )
Change subject: libpayload: Enable -Wconversion ......................................................................
Patch Set 7:
include/endian.h:39:28: error: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Werror=conversion] return ((in & 0xFF) << 8) | ((in & 0xFF00) >> 8);
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32185 )
Change subject: libpayload: Enable -Wconversion ......................................................................
Patch Set 8:
Seeing the previous CL that fixes up two headers, I'm not sure if that flag is really worth it?
Stefan Reinauer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32185 )
Change subject: libpayload: Enable -Wconversion ......................................................................
Patch Set 8:
Looking at what this requires in code changes, are we sure we want to enable it? (Do we feel it really improves the code?)
Patrick Georgi has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/32185 )
Change subject: libpayload: Enable -Wconversion ......................................................................
Abandoned