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)
This commit is contained in:
Edward O'Callaghan 2014-12-09 17:04:25 +11:00
parent a9a2e10eed
commit c36e278c50
1 changed files with 3 additions and 1 deletions

View File

@ -201,7 +201,9 @@ struct __table__ temperatures[] = {
{"80C", 80} {"80C", 80}
}; };
#endif #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 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 #define TEMPERATURE(i,d) (i < SIZEOF_TEMPERATURES) ? temperatures[i].val : temperatures[d].val // hopefully d is a correct value !!! fix