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

Compilation fail with warnings. #51

Open
kakopappa opened this issue Jul 25, 2023 · 1 comment
Open

Compilation fail with warnings. #51

kakopappa opened this issue Jul 25, 2023 · 1 comment

Comments

@kakopappa
Copy link

Hi,

looks like Micro-RTSP is not compatible with the latest version of ESP32 Core.

c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\OV2640.cpp:37:1: warning: missing initializer for member 'camera_config_t::fb_location' [-Wmissing-field-initializers]
 };
 ^
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\OV2640.cpp:37:1: warning: missing initializer for member 'camera_config_t::grab_mode' [-Wmissing-field-initializers]
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\OV2640.cpp:37:1: warning: missing initializer for member 'camera_config_t::sccb_i2c_port' [-Wmissing-field-initializers]
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\OV2640.cpp:72:1: warning: missing initializer for member 'camera_config_t::fb_location' [-Wmissing-field-initializers]
 };
 ^
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\OV2640.cpp:72:1: warning: missing initializer for member 'camera_config_t::grab_mode' [-Wmissing-field-initializers]
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\OV2640.cpp:72:1: warning: missing initializer for member 'camera_config_t::sccb_i2c_port' [-Wmissing-field-initializers]
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\OV2640.cpp:102:1: warning: missing initializer for member 'camera_config_t::fb_location' [-Wmissing-field-initializers]
 };
 ^
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\OV2640.cpp:102:1: warning: missing initializer for member 'camera_config_t::grab_mode' [-Wmissing-field-initializers]
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\OV2640.cpp:102:1: warning: missing initializer for member 'camera_config_t::sccb_i2c_port' [-Wmissing-field-initializers]
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\CStreamer.cpp: In member function 'void CStreamer::addSession(WiFiClient&)':
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\CStreamer.cpp:41:19: warning: unused variable 'session' [-Wunused-variable]
     CRtspSession* session = new CRtspSession(aClient, this); // our threads RTSP session and state
                   ^~~~~~~
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\CRtspSession.cpp: In member function 'void CRtspSession::Handle_RtspDESCRIBE()':
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\CRtspSession.cpp:298:14: warning: '%s' directive output may be truncated writing up to 1023 bytes into a region of size between 784 and 983 [-Wformat-truncation=]
              "RTSP/1.0 200 OK\r\nCSeq: %s\r\n"
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              "%s\r\n"
              ~~~~~~~~
              "Content-Base: %s/\r\n"
              ~~~~~~~~~~~~~~~~~~~~~~~
              "Content-Type: application/sdp\r\n"
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              "Content-Length: %d\r\n\r\n"
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              "%s",
              ~~~~
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\CRtspSession.cpp:306:14:
              URLBuf,
              ~~~~~~
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\CRtspSession.cpp:298:14: note: directive argument in the range [0, 1023]
c:\Users\user\Documents\Arduino\libraries\Micro-RTSP-master\src\CRtspSession.cpp:297:13: note: 'snprintf' output 97 or more bytes (assuming 2345) into a destination of size 1024
     snprintf(Response,sizeof(Response),
     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
              "RTSP/1.0 200 OK\r\nCSeq: %s\r\n"
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              "%s\r\n"
              ~~~~~~~~
              "Content-Base: %s/\r\n"
              ~~~~~~~~~~~~~~~~~~~~~~~
              "Content-Type: application/sdp\r\n"
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              "Content-Length: %d\r\n\r\n"
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              "%s",
              ~~~~~
              m_CSeq,
              ~~~~~~~
              DateHeader(),
              ~~~~~~~~~~~~~
              URLBuf,
              ~~~~~~~
              (int) strlen(SDPBuf),
              ~~~~~~~~~~~~~~~~~~~~~
              SDPBuf);
              ~~~~~~~
@kakopappa
Copy link
Author

To fix:

  1. Goto C:\Users<username>\AppData\Local\Arduino15\packages\esp32\hardware\esp32<version>

  2. Make a copy of platform.txt and rename it to platform.local.txt.

  3. Open platform.txt. Change

Arduino Compile Warning Levels

compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall -Werror=all
compiler.warning_flags.all=-Wall -Werror=all -Wextra

To:

Arduino Compile Warning Levels

compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra

4. Restart Arduino IDE !!!!

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