diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-12-09 17:04:25 +1100 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-12-09 09:04:34 +0100 |
commit | c36e278c501cd7e7c636dfc5c74836856b0ddbd4 (patch) | |
tree | 9bc4c2853b91a51626f89aba55bcff4fb56f9ad8 /src/mainboard | |
parent | a9a2e10eed693f1e0e60ea72c269125d3fadcb8a (diff) |
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@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7725
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/siemens/sitemp_g1p1/mainboard.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 |