From 3a043c47a921ff3b9d8d3e76ff0f157863a7cdf9 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 15 Sep 2015 17:37:14 -0700 Subject: cbfstool: Fix tolower() calls on Cygwin Cygwin complains: cbfstool.c: 1075:5 error: array subscript has type 'char' [-Werror=char-subscripts] so add an explicit cast. Change-Id: Ie89153518d6af2bacce3f48fc7952fee17a688dd Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/11666 Tested-by: build bot (Jenkins) Reviewed-by: Zheng Bao Reviewed-by: Julius Werner Reviewed-by: Ronald G. Minnich --- util/cbfstool/cbfstool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index 5d87c9f0d3..58f801790e 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -1219,10 +1219,10 @@ int main(int argc, char **argv) break; case 's': param.size = strtoul(optarg, &suffix, 0); - if (tolower(suffix[0])=='k') { + if (tolower((int)suffix[0])=='k') { param.size *= 1024; } - if (tolower(suffix[0])=='m') { + if (tolower((int)suffix[0])=='m') { param.size *= 1024 * 1024; } break; -- cgit v1.2.3