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 <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/11666
Tested-by: build bot (Jenkins)
Reviewed-by: Zheng Bao <zheng.bao@amd.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Stefan Reinauer 2015-09-15 17:37:14 -07:00 committed by Stefan Reinauer
parent 8193b068d4
commit 3a043c47a9
1 changed files with 2 additions and 2 deletions

View File

@ -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;