Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13654
-gerrit
commit be89dd69896264602e1c5cb020b0e83c1271569e Author: Stefan Reinauer stefan.reinauer@coreboot.org Date: Tue Feb 9 17:55:14 2016 -0800
bimgtool: Match CRC code guards
Make sure that the statically defined CRC functions are enabled by the same conditionals as the code using them.
Change-Id: Ic24e2ed1a80b8e5f6623881b08d86f7b608a206e Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org --- util/bimgtool/bimgtool.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/util/bimgtool/bimgtool.c b/util/bimgtool/bimgtool.c index 4e8fb3f..13ded54 100644 --- a/util/bimgtool/bimgtool.c +++ b/util/bimgtool/bimgtool.c @@ -69,6 +69,7 @@ struct crc_t { return ret; \ }
+#if defined(CRC_X25) static uint16_t crc_x25(uint16_t crc, void *void_buf, size_t size) { static const uint16_t crc_table[16] = { @@ -87,7 +88,9 @@ static uint16_t crc_x25(uint16_t crc, void *void_buf, size_t size)
return crc; } +#endif
+#if defined(CRC_16) static uint16_t crc_16(uint16_t crc, void *void_buf, size_t size) { /* @@ -136,8 +139,8 @@ static uint16_t crc_16(uint16_t crc, void *void_buf, size_t size) }
return crc; - } +#endif
static const struct crc_t crc_type = { #if defined(CRC_16)