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

Disable -Werror=old-style-cast #174

Open
mnlipp opened this issue Nov 11, 2023 · 0 comments
Open

Disable -Werror=old-style-cast #174

mnlipp opened this issue Nov 11, 2023 · 0 comments

Comments

@mnlipp
Copy link

mnlipp commented Nov 11, 2023

Trying to compile (several files), I get

In file included from /home/mnl/tools/esp/esp-idf/components/freertos/esp_additions/include/freertos/idf_additions.h:20,
                 from /home/mnl/tools/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:1532,
                 from /home/mnl/devel/esp/WiFi-IoT-Base/externals/smooth/lib/smooth/include/smooth/core/Task.h:38,
                 from /home/mnl/devel/esp/WiFi-IoT-Base/externals/smooth/lib/smooth/include/smooth/core/network/BufferContainer.h:21,
                 from /home/mnl/devel/esp/WiFi-IoT-Base/externals/smooth/lib/smooth/include/smooth/application/network/http/IResponseOperation.h:21,
                 from /home/mnl/devel/esp/WiFi-IoT-Base/externals/smooth/lib/smooth/include/smooth/application/network/http/regular/responses/HeaderOnlyResponse.h:20,
                 from /home/mnl/devel/esp/WiFi-IoT-Base/externals/smooth/lib/smooth/include/smooth/application/network/http/regular/responses/StringResponse.h:20,
                 from /home/mnl/devel/esp/WiFi-IoT-Base/externals/smooth/lib/smooth/include/smooth/application/network/http/regular/TemplateProcessor.h:25,
                 from /home/mnl/devel/esp/WiFi-IoT-Base/externals/smooth/lib/smooth/application/network/http/regular/TemplateProcessor.cpp:18:
/home/mnl/tools/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos/task.h:204:46: error: use of old-style cast to 'BaseType_t' {aka 'int'} [-Werror=old-style-cast]
  204 | #define tskNO_AFFINITY      ( ( BaseType_t ) 0x7FFFFFFF )
      |                                              ^~~~~~~~~~
/home/mnl/devel/esp/WiFi-IoT-Base/externals/smooth/lib/smooth/include/smooth/core/Task.h:95:29: note: in expansion of macro 'tskNO_AFFINITY'
   95 |                  int core = tskNO_AFFINITY);
      |                             ^~~~~~~~~~~~~~

I cannot change how FreeRTOS does it's casting, but even if I would (I actually tried) and replaced the old style casts with new style casts in the header files, compiling with gcc fails, of course.

It seems to me that the only solution is to get rid of this -Werror=old-style-cast.

Aside from this being an issue, can somebody tell me how to do this without spending a week on understanding this extremely complicated build system? Currently, this prevents me from using smooth (which I'd really like to do).

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