[coreboot-gerrit] New patch to review for coreboot: cbfstool: Fix tolower() calls on Cygwin

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Sep 16 00:39:08 CET 2015


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11666

-gerrit

commit 412c4732cf369edc2773521820145f4dee64aedb
Author: Stefan Reinauer <reinauer at chromium.org>
Date:   Tue Sep 15 17:37:14 2015 -0700

    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 at coreboot.org>
---
 util/cbfstool/cbfstool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index d6c116a..7a2b7fe 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -1072,10 +1072,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;



More information about the coreboot-gerrit mailing list