sparkfun / SparkFun_ICM-20948_ArduinoLibrary

Arduino support for ICM_20948 w/ portable C backbone
Other
168 stars 72 forks source link

How to fix this error on ICM_20948_C.c #117

Closed gipaq1950 closed 1 year ago

gipaq1950 commented 1 year ago

colcon build --packages-select ros_qwiic_icm_20948 Starting >>> ros_qwiic_icm_20948 --- stderr: ros_qwiic_icm_20948
/home/jetson/dev_ws/src/ros_qwiic_icm_20948/src/SparkFun_ICM-20948_ArduinoLibrary/src/util/ICM_20948_C.c: In function ‘ICM_20948_firmware_load’: /home/jetson/dev_ws/src/ros_qwiic_icm_20948/src/SparkFun_ICM-20948_ArduinoLibrary/src/util/ICM_20948_C.c:1276:64: warning: unused parameter ‘pdev’ [-Wunused-parameter] ICM_20948_Status_e ICM_20948_firmware_load(ICM_20948_Device_t *pdev)


make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
---
Finished <<< ros_qwiic_icm_20948 [2.79s]

Summary: 1 package finished [3.75s]
  1 package had stderr output: ros_qwiic_icm_20948
PaulZC commented 1 year ago

Please try inserting (void)pdev; :

ICM_20948_Status_e ICM_20948_firmware_load(ICM_20948_Device_t *pdev)
{
#if defined(ICM_20948_USE_DMP)
  return (inv_icm20948_firmware_load(pdev, dmp3_image, sizeof(dmp3_image), DMP_LOAD_START));
#else
  (void)pdev;
  return ICM_20948_Stat_DMPNotSupported;
#endif
}