Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler warnings and errors in Arduino2.2.1 #299

Open
mcl-uk opened this issue Oct 15, 2023 · 0 comments
Open

Compiler warnings and errors in Arduino2.2.1 #299

mcl-uk opened this issue Oct 15, 2023 · 0 comments

Comments

@mcl-uk
Copy link

mcl-uk commented Oct 15, 2023

I'm getting a whole bunch of compile-time warnings & errors in Arduino ISE2.2.1 with ESP core lib v2.0.14:

:\Users\Steve\Documents\Arduino\esp32-cam-webserver\app_httpd.cpp: In function 'void serialDump()':
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\app_httpd.cpp:151:19: error: format '%i' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Werror=format=]
     Serial.printf("CPU Freq: %i MHz, Xclk Freq: %i MHz\r\n", ESP.getCpuFreqMHz(), xclk);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                       ~~~~
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\app_httpd.cpp: In function 'esp_err_t status_handler(httpd_req_t*)':
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\app_httpd.cpp:452:23: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
         p+=sprintf(p, "\"xclk\":%u,", xclk);
                       ^~~~~~~~~~~~~~  ~~~~
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\app_httpd.cpp: In function 'esp_err_t dump_handler(httpd_req_t*)':
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\app_httpd.cpp:601:19: error: format '%i' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Werror=format=]
     d+= sprintf(d,"CPU Freq: %i MHz, Xclk Freq: %i MHz<br>\n", ESP.getCpuFreqMHz(), xclk);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                       ~~~~
cc1plus.exe: some warnings being treated as errors
In file included from C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:42:
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\myconfig.h:25:54: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
 struct station stationList[] = {{"OCH-2", NULL, true}};
                                                      ^
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino: In function 'void StartCamera()':
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:332:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_sda' is deprecated: please use pin_sccb_sda instead [-Wdeprecated-declarations]
     config.pin_sscb_sda = SIOD_GPIO_NUM;
            ^~~~~~~~~~~~
In file included from C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:1:
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:123:87: note: declared here
         int pin_sscb_sda __attribute__((deprecated("please use pin_sccb_sda instead")));           /*!< GPIO pin for camera SDA line (legacy name) */
                                                                                       ^
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:332:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_sda' is deprecated: please use pin_sccb_sda instead [-Wdeprecated-declarations]
     config.pin_sscb_sda = SIOD_GPIO_NUM;
            ^~~~~~~~~~~~
In file included from C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:1:
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:123:87: note: declared here
         int pin_sscb_sda __attribute__((deprecated("please use pin_sccb_sda instead")));           /*!< GPIO pin for camera SDA line (legacy name) */
                                                                                       ^
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:332:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_sda' is deprecated: please use pin_sccb_sda instead [-Wdeprecated-declarations]
     config.pin_sscb_sda = SIOD_GPIO_NUM;
            ^~~~~~~~~~~~
In file included from C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:1:
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:123:87: note: declared here
         int pin_sscb_sda __attribute__((deprecated("please use pin_sccb_sda instead")));           /*!< GPIO pin for camera SDA line (legacy name) */
                                                                                       ^
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:333:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_scl' is deprecated: please use pin_sccb_scl instead [-Wdeprecated-declarations]
     config.pin_sscb_scl = SIOC_GPIO_NUM;
            ^~~~~~~~~~~~
In file included from C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:1:
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:127:87: note: declared here
         int pin_sscb_scl __attribute__((deprecated("please use pin_sccb_scl instead")));           /*!< GPIO pin for camera SCL line (legacy name) */
                                                                                       ^
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:333:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_scl' is deprecated: please use pin_sccb_scl instead [-Wdeprecated-declarations]
     config.pin_sscb_scl = SIOC_GPIO_NUM;
            ^~~~~~~~~~~~
In file included from C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:1:
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:127:87: note: declared here
         int pin_sscb_scl __attribute__((deprecated("please use pin_sccb_scl instead")));           /*!< GPIO pin for camera SCL line (legacy name) */
                                                                                       ^
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:333:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_scl' is deprecated: please use pin_sccb_scl instead [-Wdeprecated-declarations]
     config.pin_sscb_scl = SIOC_GPIO_NUM;
            ^~~~~~~~~~~~
In file included from C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:1:
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:127:87: note: declared here
         int pin_sscb_scl __attribute__((deprecated("please use pin_sccb_scl instead")));           /*!< GPIO pin for camera SCL line (legacy name) */
                                                                                       ^
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino: In lambda function:
C:\Users\Steve\Documents\Arduino\esp32-cam-webserver\esp32-cam-webserver.ino:727:27: error: unused variable 'err' [-Werror=unused-variable]
                 esp_err_t err = esp_camera_deinit();
                           ^~~
cc1plus.exe: some warnings being treated as errors
Multiple libraries were found for "WiFi.h"
  Used: C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\WiFi
  Not used: C:\Users\Steve\Documents\Arduino\libraries\WiFiEspAT
Using library WiFi at version 2.0.0 in folder: C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\WiFi 
Using library DNSServer at version 2.0.0 in folder: C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\DNSServer 
Using library ArduinoOTA at version 2.0.0 in folder: C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\ArduinoOTA 
Using library Update at version 2.0.0 in folder: C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Update 
Using library ESPmDNS at version 2.0.0 in folder: C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\ESPmDNS 
Using library FS at version 2.0.0 in folder: C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\FS 
Using library SPIFFS at version 2.0.0 in folder: C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\SPIFFS 
exit status 1

Compilation error: format '%i' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Werror=format=]

Thanks in advance for any help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant