[coreboot-gerrit] New patch to review for coreboot: 03879b6 mainboard/siemens/sitemp_g1p1/mainboard.c: Fix implicit conversion

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Tue Dec 9 07:08:33 CET 2014


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7725

-gerrit

commit 03879b67c5c77126f51a76e0eac548e4dd297c85
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Tue Dec 9 17:04:25 2014 +1100

    mainboard/siemens/sitemp_g1p1/mainboard.c: Fix implicit conversion
    
    Clang warns of an implicit conversion from 'double' to 'int'
    e.g. changes value from '26.67' to '26'. Thus take the floor() of
    the array and not change orginal behaviour.
    
    Change-Id: Ifcc7bbfe8d627451b82053f53a885f315e2550ec
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 src/mainboard/siemens/sitemp_g1p1/mainboard.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mainboard/siemens/sitemp_g1p1/mainboard.c b/src/mainboard/siemens/sitemp_g1p1/mainboard.c
index f16ffe8..4b92877 100644
--- a/src/mainboard/siemens/sitemp_g1p1/mainboard.c
+++ b/src/mainboard/siemens/sitemp_g1p1/mainboard.c
@@ -201,7 +201,9 @@ struct __table__ temperatures[] = {
 	{"80C", 80}
 };
 #endif
-int trange[] = {2.0,2.5,3.33,4.0,5.0,6.67,8.0,10.0,13.33,16.0,20.0,26.67,32.0,40.0,53.33,80.0};
+// FIXME: implicit conversion from 'double' to 'int'
+// int trange[] = {2.0,2.5,3.33,4.0,5.0,6.67,8.0,10.0,13.33,16.0,20.0,26.67,32.0,40.0,53.33,80.0};
+int trange[] = {2,2,3,4,5,6,8,10,13,16,20,26,32,40,53,80};
 
 #define SIZEOF_TEMPERATURES sizeof(temperatures)/sizeof(struct __table__)
 #define TEMPERATURE(i,d) (i < SIZEOF_TEMPERATURES) ? temperatures[i].val : temperatures[d].val // hopefully d is a correct value !!! fix



More information about the coreboot-gerrit mailing list