diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2016-02-09 17:55:14 -0800 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-02-12 04:47:20 +0100 |
commit | f0d0d918681c944f09a2363a1241c741aa3b25ff (patch) | |
tree | 02d4864733df7d59a1028261c67b6c4afffd7ff6 /util | |
parent | 3740d77020ac298b69c7b49369f93b6cf9548d0a (diff) |
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>
Reviewed-on: https://review.coreboot.org/13654
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/bimgtool/bimgtool.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/bimgtool/bimgtool.c b/util/bimgtool/bimgtool.c index 4e8fb3feed..13ded54654 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) |