fix warning about cast realignment, WIP

This commit is contained in:
Philippe Teuwen committed 2020-05-03 17:34:01 +02:00
1 parent 82ad1b683a
commit c94eae0046
8 files changed
+30 -24

No files matched your search

+4 -2
View File
@@ -23,8 +23,10 @@ void crc32_ex(const uint8_t *data, const size_t len, uint8_t *crc) {
for (size_t i = 0; i < len; i++) {
crc32_byte(&desfire_crc, data[i]);
}
*((uint32_t *)(crc)) = htole32(desfire_crc);
uint32_t crctmp = htole32(desfire_crc);
for (size_t i=0; i < sizeof(uint32_t); i++) {
crc[i] = ((uint8_t *) &crctmp)[i];
}
}
void crc32_append(uint8_t *data, const size_t len) {
+1 -1
View File
@@ -1,6 +1,6 @@
MYSRCPATHS =
MYINCLUDES = -I. -I..
MYCFLAGS =
MYCFLAGS = -Wno-cast-align
MYDEFS =
MYSRCS = \
aes.c \