You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arduino IDE 2.3.2 with warnings enabled (Compiler Warnings set to ALL in Arduino IDE->Settings)
Steps to reproduce
Compile with warnings enabled (Compiler Warnings set to ALL in Arduino IDE->Settings)
Expected behaviour
Compiler should not create warnings for printfs or Scafs regrind type mismatches with uint32_t or int32_t types.
Actual behaviour
SparkFun_u-blox_SARA-R5_Arduino_Library.cpp: In member function 'SARA_R5_error_t SARA_R5::setUtimeConfiguration(int32_t, int32_t)':
SparkFun_u-blox_SARA-R5_Arduino_Library.cpp:1487:25: warning: format '%d' expects argument of type 'int', but argument 4 has type 'int32_t' {aka 'long int'} [-Wformat=]
1487 | sprintf(command, "%s=%d,%d", SARA_R5_GNSS_TIME_CONFIGURATION, offsetNanoseconds, offsetSeconds);
| ~^ ~~~~~~~~~~~~~~~~~
| | |
| int int32_t {aka long int}
| %ld
SparkFun_u-blox_SARA-R5_Arduino_Library.cpp:1487:28: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int32_t' {aka 'long int'} [-Wformat=]
1487 | sprintf(command, "%s=%d,%d", SARA_R5_GNSS_TIME_CONFIGURATION, offsetNanoseconds, offsetSeconds);
| ~^ ~~~~~~~~~~~~~
| | |
| int int32_t {aka long int}
| %ld
SparkFun_u-blox_SARA-R5_Arduino_Library.cpp: In member function 'SARA_R5_error_t SARA_R5::getUtimeConfiguration(int32_t*, int32_t*)':
SparkFun_u-blox_SARA-R5_Arduino_Library.cpp:1532:37: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'int32_t*' {aka 'long int*'} [-Wformat=]
1532 | scanned = sscanf(searchPtr, "%d,%d\r\n", &ons, &os);
| ~^ ~~~~
| | |
| int* int32_t* {aka long int*}
| %ld
SparkFun_u-blox_SARA-R5_Arduino_Library.cpp:1532:40: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'int32_t*' {aka 'long int*'} [-Wformat=]
1532 | scanned = sscanf(searchPtr, "%d,%d\r\n", &ons, &os);
| ~^ ~~~
| | |
| int* int32_t* {aka long int*}
| %ld
SparkFun_u-blox_SARA-R5_Arduino_Library/src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp: In member function 'SARA_R5_error_t SARA_R5::gpsRequest(unsigned int, uint32_t, bool, unsigned int)':
SparkFun_u-blox_SARA-R5_Arduino_Library/src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp:5259:36: warning: format '%d' expects argument of type 'int', but argument 7 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
5259 | sprintf(command, "%s=2,%d,%d,%d,%d", SARA_R5_GNSS_REQUEST_LOCATION,
| ~^
| |
| int
| %ld
5260 | sensor, detailed ? 1 : 0, timeout, accuracy);
| ~~~~~~~~
| |
| uint32_t {aka long unsigned int}
SparkFun_u-blox_SARA-R5_Arduino_Library/src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp: In member function 'SARA_R5::SARA_R5_gpio_mode_t SARA_R5::getGpioMode(SARA_R5_gpio_t)':
SparkFun_u-blox_SARA-R5_Arduino_Library/src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp:2635:9: warning: pointer 'gpioStart' may be used after 'void free(void*)' [-Wuse-after-free]
2635 | sscanf(gpioStart, "%*d,%d\r\n", &gpioMode);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SparkFun_u-blox_SARA-R5_Arduino_Library/src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp:2631:7: note: call to 'void free(void*)' here
2631 | free(response);
| ~~~~^~~~~~~~~~```
The text was updated successfully, but these errors were encountered:
mazgch
added a commit
to mazgch/SparkFun_u-blox_SARA-R5_Arduino_Library
that referenced
this issue
May 29, 2024
Subject of the issue
Install arduino_esp32 version 3.0.0
Your workbench
Arduino IDE 2.3.2 with warnings enabled (Compiler Warnings set to ALL in Arduino IDE->Settings)
Steps to reproduce
Compile with warnings enabled (Compiler Warnings set to ALL in Arduino IDE->Settings)
Expected behaviour
Compiler should not create warnings for printfs or Scafs regrind type mismatches with uint32_t or int32_t types.
Actual behaviour
The text was updated successfully, but these errors were encountered: