Skip to content

Doesn't build with -Wformat-security. #1250

Open
@Fuuzetsu

Description

@Fuuzetsu

In nixpkgs, -Wformat-security is on by default. When trying to package this, it failed to build.

src/gpu/soft/gpu.cc: In member function 'virtual void PCSX::SoftGPU::impl::debug()':
src/gpu/soft/gpu.cc:947:20: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
  947 |         ImGui::Text(
      |         ~~~~~~~~~~~^
  948 |             _("Debugging features are not supported when using the software renderer yet\nConsider enabling the "
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  949 |               "OpenGL "
      |               ~~~~~~~~~
  950 |               "GPU option instead."));
      |               ~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make: *** [Makefile:238: src/gpu/soft/gpu.o] Error 1

It'd be nice if it built without having to explicitly disable this hardening feature.

It's probably not really a problem due to the nature of this software but if it's very easy to address, cool.

I tried with 4981703 but I don't see anything indicating that it got fixed since.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions