comparison src/cs/drivers/drv_app/fchg/fchg_ffs_init.c @ 344:562fa85c8963

FCHG battery table loading: comparison signedness issue
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 15 Dec 2017 19:58:18 +0000
parents 8166b0afcf8c
children
comparison
equal deleted inserted replaced
343:e0b27310e6ba 344:562fa85c8963
35 { 35 {
36 int rc; 36 int rc;
37 37
38 rc = ffs_file_read("/etc/batterytab", pwr_ctrl->batt_thresholds, 38 rc = ffs_file_read("/etc/batterytab", pwr_ctrl->batt_thresholds,
39 sizeof(pwr_ctrl->batt_thresholds)); 39 sizeof(pwr_ctrl->batt_thresholds));
40 if (rc >= sizeof(T_PWR_THRESHOLDS)) { 40 if (rc >= (int)sizeof(T_PWR_THRESHOLDS)) {
41 pwr_ctrl->nb_thresholds = rc / sizeof(T_PWR_THRESHOLDS); 41 pwr_ctrl->nb_thresholds = rc / sizeof(T_PWR_THRESHOLDS);
42 rvf_send_trace("FCHG: battery table loaded from FFS", 35, 42 rvf_send_trace("FCHG: battery table loaded from FFS", 35,
43 NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH, 43 NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH,
44 FCHG_USE_ID); 44 FCHG_USE_ID);
45 } else { 45 } else {