Closed sh7d closed 5 years ago
Well, it's looks like it's because of never version of gcc. For now i just have to add additional cflag :)
diff --git a/common/Makefile.common b/common/Makefile.common
index bbdf1d0e..d2353ead 100644
--- a/common/Makefile.common
+++ b/common/Makefile.common
@@ -64,7 +64,7 @@ VPATH = . ../common ../common/crapto1 ../common/polarssl ../fpga ../zlib ../arms
INCLUDES = ../include/proxmark3.h ../include/at91sam7s512.h ../include/config_gpio.h ../include/pm3_cmd.h $(APP_INCLUDES)
-CFLAGS = -c $(INCLUDE) -Wall -Werror -pedantic -Wunused -std=c99 $(APP_CFLAGS) -Os
+CFLAGS = -c $(INCLUDE) -Wall -Werror -Wno-address-of-packed-member -pedantic -Wunused -std=c99 $(APP_CFLAGS) -Os
LDFLAGS = -nostartfiles -nodefaultlibs -Wl,-gc-sections -n
LIBS = -lgcc
Interesting, which gcc version are you using ?
ha sorry it's in your title
The warning is kind of legit, as a packed field could be at a boundary not reachable by a pointer. But here "we know what we're doing" so it's more a false positive. Still it would be cleaner to remove locally the warnings rather than disabling entirely this class of warnings... But this packet->data.asBytes is used at many locations, I've to think what's best approach... and get a gcc 9 to test...
I just realized the solution was easy. Since we dissociated the structs going on the wire from the internal structs, we don't need to pack the internal structs anymore. Fixed in https://github.com/RfidResearchGroup/proxmark3/commit/d05cd5ff2b25146e3728a4f333724b3b3e1107b6
So, i tried to compile 9322ce626e36fa433bda0cd4a56be14c31aa426a, and im unable to compile os images, cause of this little suprise :)
Gcc version: