Skip to content

Disable -Werror=old-style-cast #174

Description

@mnlipp

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions