grumpycoders/pcsx-redux

Doesn't build with -Wformat-security.

Open

#1,250 opened on Mar 23, 2023

View on GitHub
 (3 comments) (0 reactions) (0 assignees)C++ (146 forks)auto 404
good first issuehelp wanted

Repository metrics

Stars
 (962 stars)
PR merge metrics
 (PR metrics pending)

Description

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 49817037253c318b10b8470fa9e37efa873ba408 but I don't see anything indicating that it got fixed since.

Contributor guide