canutils: odb_decodepid: fix two debug prints
Fix the following printfs, as reported by cppcheck: canutils/libobd2/obd_decodepid.c:85:9: error: printf format string requires 1 parameter but only 0 are given. [wrongPrintfScanfArgNum] printf("Supported PIDs: %08X\n"); ^ canutils/libobd2/obd_decodepid.c:114:9: error: printf format string requires 2 parameters but only 1 is given. [wrongPrintfScanfArgNum] printf("Throttle position = %d\% \n", (100 * dev->data[3])/255); ^ Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
This commit is contained in:
parent
5ac15130db
commit
2f44643704
@ -82,7 +82,7 @@ FAR char *obd_decode_pid(FAR struct obd_dev_s *dev, uint8_t pid)
|
||||
(dev->data[5] << 8) | dev->data[6];
|
||||
snprintf(g_data, MAXDATA, "%08X", pids);
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
printf("Supported PIDs: %08X\n");
|
||||
printf("Supported PIDs: %08X\n", pids);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -111,7 +111,7 @@ FAR char *obd_decode_pid(FAR struct obd_dev_s *dev, uint8_t pid)
|
||||
case OBD_PID_THROTTLE_POSITION:
|
||||
snprintf(g_data, MAXDATA, "%d", (100 * dev->data[3])/255);
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
printf("Throttle position = %d\%\n", (100 * dev->data[3])/255);
|
||||
printf("Throttle position = %d\n", (100 * dev->data[3]) / 255);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user