Skip to content

Build failure with -Werror=declaration-after-statement #5535

@Phytolizer

Description

@Phytolizer

I just tried compiling SDL2 on release-2.0.20 as well as master (c36bd78), and am getting this error consistently. It almost definitely has to do with the new Pipewire release.

In file included from /usr/include/pipewire-0.3/pipewire/properties.h:35,
                 from /usr/include/pipewire-0.3/pipewire/core.h:87,
                 from /usr/include/pipewire-0.3/pipewire/context.h:67,
                 from /usr/include/pipewire-0.3/pipewire/protocol.h:46,
                 from /usr/include/pipewire-0.3/pipewire/proxy.h:108,
                 from /usr/include/pipewire-0.3/pipewire/client.h:35,
                 from /usr/include/pipewire-0.3/pipewire/pipewire.h:35,
                 from /home/kyle/Code/SDL/src/audio/pipewire/SDL_pipewire.h:28,
                 from /home/kyle/Code/SDL/src/audio/pipewire/SDL_pipewire.c:29:
/usr/include/spa-0.2/spa/utils/string.h: In function ‘spa_strtof’:
/usr/include/spa-0.2/spa/utils/string.h:282:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  282 |         locale_t prev = uselocale(locale);
      |         ^~~~~~~~
/usr/include/spa-0.2/spa/utils/string.h: In function ‘spa_strtod’:
/usr/include/spa-0.2/spa/utils/string.h:325:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  325 |         locale_t prev = uselocale(locale);
      |         ^~~~~~~~
cc1: some warnings being treated as errors

Environment: EndeavourOS Linux, GCC 11.2.0

Configure command: cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=Debug
Build command: cmake --build build

Pipewire version: 0.3.50

Metadata

Metadata

Assignees

No one assigned

    Labels

    notourbugThis bug is caused by an external component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions