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

tiles no sound build fails with use of undeclared identifier error #76796

Closed
HadeanLake opened this issue Oct 3, 2024 · 0 comments · Fixed by #76802
Closed

tiles no sound build fails with use of undeclared identifier error #76796

HadeanLake opened this issue Oct 3, 2024 · 0 comments · Fixed by #76802
Labels
(S2 - Confirmed) Bug that's been confirmed to exist

Comments

@HadeanLake
Copy link
Contributor

HadeanLake commented Oct 3, 2024

Describe the bug

both gcc-14 and clang-18 linux tiles no sound builds fail with:
Error: src/sdltiles.cpp:3726:9: error: use of undeclared identifier 'sound_init_success' or src/sdltiles.cpp:3726:9: error: ‘sound_init_success’ was not declared in this scope
Probably caused by #76782 . Clang 12, Ubuntu, Tiles, ASan failed with same error

Attach save file

N/A

Steps to reproduce

make -j4 TILES=1 SOUND=0

Expected behavior

no fatal errors

Screenshots

No response

Versions and configuration

linux x64
f61d1cd
clang version 18.1.8
gcc version 14.2.1

Additional context

it is declared inside #if defined(SDL_SOUND) block. I guess wrapping this one use as well is a reasonable fix for this fix this. Declaring it outside of that block does not make sense

diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp
index bea483bd98..6c42800984 100644
--- a/src/sdltiles.cpp
+++ b/src/sdltiles.cpp
@@ -3722,10 +3722,12 @@ void catacurses::init_interface()
     color_loader<SDL_Color>().load( windowsPalette );
     init_colors();
 
+#if defined(SDL_SOUND)
     // initialize sound set
     if( sound_init_success ) {
         load_soundset();
     }
+#endif
 
     font = std::make_unique<FontFallbackList>( renderer, format, fl.fontwidth, fl.fontheight,
             windowsPalette, fl.typeface, fl.fontsize, fl.fontblending );
@HadeanLake HadeanLake added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Oct 3, 2024
@HadeanLake HadeanLake changed the title linux tiles no sound build fails with use of undeclared identifier error tiles no sound build fails with use of undeclared identifier error Oct 4, 2024
@RenechCDDA RenechCDDA added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants