From c36e278c501cd7e7c636dfc5c74836856b0ddbd4 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Tue, 9 Dec 2014 17:04:25 +1100 Subject: 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 Reviewed-on: http://review.coreboot.org/7725 Reviewed-by: Alexandru Gagniuc Tested-by: build bot (Jenkins) --- src/mainboard/siemens/sitemp_g1p1/mainboard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mainboard/siemens') diff --git a/src/mainboard/siemens/sitemp_g1p1/mainboard.c b/src/mainboard/siemens/sitemp_g1p1/mainboard.c index f16ffe892f..4b92877790 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 -- cgit v1.2.3