coreboot-kgpe-d16/util
zbao 37450ff534 cbfstool: Fix build error with clang when comparing enum
If HOSTCC=clang, the -Wtautological-constant-out-of-range-compare is
set automaticaaly. That assume the value of type enum is in the defined
range. Then testing if a type enum is out of range causes build error.

Error:
coreboot/util/cbfstool/cbfs_image.c:1387:16: error:
 comparison of constant 4 with expression of type 'enum vb2_hash_algorithm'
 is always false [-Werror,-Wtautological-constant-out-of-range-compare]
 if (hash_type >= CBFS_NUM_SUPPORTED_HASHES)
    ~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

clang version:
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.2
Thread model: posix

Change-Id: I3e1722bf6f9553793a9f0c7f4e790706b6938522
Signed-off-by: zbao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/12330
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20 05:36:48 +01:00
..
abuild abuild: allow specifying multiple targets by mainboard descriptor 2015-11-01 14:27:02 +01:00
acpi tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
amdfwtool amdfwtool: Add amdfwtool to combine AMD firmwares 2015-11-19 04:11:59 +01:00
amdtools Remove empty lines at end of file 2015-06-08 00:55:07 +02:00
arm_boot_tools/mksunxiboot arm_boot_tools: Add 'b' to fopen flags for Windows compatibility 2014-12-19 18:55:34 +01:00
autoport tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
bimgtool tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
board_status board-status: Reorder the table categories 2015-11-03 21:29:16 +01:00
broadcom secimage: Use libz's crc32 function 2015-08-09 12:34:24 +02:00
cbfstool cbfstool: Fix build error with clang when comparing enum 2015-11-20 05:36:48 +01:00
cbmem util/cbmem: remove duplicated cbmem data structure logic. 2015-11-04 00:04:17 +01:00
crossgcc crossgcc: Update makefile builds 2015-11-19 16:50:00 +01:00
dtd_parser tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
ectool tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
exynos exynos: Install the BL1 and set the checksum in the Makefile. 2014-09-09 20:01:18 +02:00
fuzz-tests tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
genbuild_h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
genprof util/genprof: improve handling of command line arguments 2014-08-12 09:02:44 +02:00
gitconfig gitconfig/rebase.sh: adapt default branch name 2015-08-28 18:41:21 +00:00
ifdfake tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
ifdtool ifdtool: Makefile: fix install target 2015-11-17 05:18:28 +01:00
inteltool tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
intelvbttool tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
ipqheader Remove empty lines at end of file 2015-06-08 00:55:07 +02:00
k8resdump tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
kconfig util/kconfig: fill glob_t with 0 before calling glob 2015-11-05 02:16:02 +01:00
lint lint: properly terminate junit report on error 2015-11-19 16:13:50 +01:00
msrtool tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
nvidia nvidia/cbootimage: update to 1.5 2015-04-25 12:16:58 +02:00
nvramtool tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
optionlist tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
release util/release: Add release notes generator script 2015-11-11 20:42:00 +01:00
rockchip add make_idb.py & update bootblock 2015-03-24 15:24:52 +01:00
romcc romcc: Allow adding non-existent paths to include path 2015-11-19 21:20:29 +01:00
sconfig sconfig: remove warning about root_complex 2015-11-14 18:43:06 +01:00
scripts utils/scripts: Add microcode conversion tool 2015-11-10 18:46:04 +01:00
showdevicetree tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
spkmodem_recv tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
superiotool tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
uio_usbdebug tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
vgabios vgabios: fix compilation after x86emu changes 2015-10-25 21:33:32 +01:00
viatool tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
xcompile tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00