Skip to content

Fix gcc [-Wconversion-null] warning: passing NULL to non-pointer argu… - #32

Closed
ludolpif wants to merge 1 commit into
Ravbug:mainfrom
ludolpif:pr-fix-warn-null-propertiesid
Closed

ludolpif wants to merge 1 commit into
Ravbug:mainfrom
ludolpif:pr-fix-warn-null-propertiesid

Conversation

@ludolpif

Copy link
Copy Markdown

Hi,
I just compiled those samples using gcc (Debian 14.2.0-19). There is a NULL to zero conversion warning, I think and hope this is safe to replace with zero for every platform / compilers as I see typedef Uint32 SDL_PropertiesID; in SDL3/SDL_properties.h.

./src/main.cpp:120:31: warning: passing NULL to non-pointer argument 2 of ‘bool MIX_PlayTrack(MIX_Track*, SDL_PropertiesID)’ [-Wconversion-null]
  120 |     MIX_PlayTrack(mixerTrack, NULL);
      |                               ^~~~
In file included from ./src/main.cpp:6:
./SDL_mixer/include/SDL3_mixer/SDL_mixer.h:1922:83: note:   declared here
 1922 | extern SDL_DECLSPEC bool SDLCALL MIX_PlayTrack(MIX_Track *track, SDL_PropertiesID options);
      |                                                                  ~~~~~~~~~~~~~~~~~^~~~~~~

…ment 2 of ‘bool MIX_PlayTrack(MIX_Track*, SDL_PropertiesID)

./src/main.cpp:120:31: warning: passing NULL to non-pointer argument 2 of ‘bool MIX_PlayTrack(MIX_Track*, SDL_PropertiesID)’ [-Wconversion-null]
  120 |     MIX_PlayTrack(mixerTrack, NULL);
      |                               ^~~~
In file included from ./src/main.cpp:6:
./SDL_mixer/include/SDL3_mixer/SDL_mixer.h:1922:83: note:   declared here
 1922 | extern SDL_DECLSPEC bool SDLCALL MIX_PlayTrack(MIX_Track *track, SDL_PropertiesID options);
      |                                                                  ~~~~~~~~~~~~~~~~~^~~~~~~
@ludolpif ludolpif closed this by deleting the head repository Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant