Skip to content

Commit

Permalink
audio/video: Fix uninitialized field warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kontrabant authored and mupfdev committed Feb 15, 2025
1 parent 23522a0 commit 4d4af22
Show file tree
Hide file tree
Showing 41 changed files with 63 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/audio/aaudio/SDL_aaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ static bool AAUDIO_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap AAUDIO_bootstrap = {
"AAudio", "AAudio audio driver", AAUDIO_Init, false
"AAudio", "AAudio audio driver", AAUDIO_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_AAUDIO
2 changes: 1 addition & 1 deletion src/audio/alsa/SDL_alsa_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ static bool ALSA_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap ALSA_bootstrap = {
"alsa", "ALSA PCM audio", ALSA_Init, false
"alsa", "ALSA PCM audio", ALSA_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_ALSA
2 changes: 1 addition & 1 deletion src/audio/coreaudio/SDL_coreaudio.m
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ static bool COREAUDIO_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap COREAUDIO_bootstrap = {
"coreaudio", "CoreAudio", COREAUDIO_Init, false
"coreaudio", "CoreAudio", COREAUDIO_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_COREAUDIO
2 changes: 1 addition & 1 deletion src/audio/directsound/SDL_directsound.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ static bool DSOUND_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap DSOUND_bootstrap = {
"directsound", "DirectSound", DSOUND_Init, false
"directsound", "DirectSound", DSOUND_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_DSOUND
2 changes: 1 addition & 1 deletion src/audio/disk/SDL_diskaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static bool DISKAUDIO_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap DISKAUDIO_bootstrap = {
"disk", "direct-to-disk audio", DISKAUDIO_Init, true
"disk", "direct-to-disk audio", DISKAUDIO_Init, true, false
};

#endif // SDL_AUDIO_DRIVER_DISK
2 changes: 1 addition & 1 deletion src/audio/dsp/SDL_dspaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static bool DSP_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap DSP_bootstrap = {
"dsp", "Open Sound System (/dev/dsp)", DSP_Init, false
"dsp", "Open Sound System (/dev/dsp)", DSP_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_OSS
2 changes: 1 addition & 1 deletion src/audio/dummy/SDL_dummyaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,5 @@ static bool DUMMYAUDIO_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap DUMMYAUDIO_bootstrap = {
"dummy", "SDL dummy audio driver", DUMMYAUDIO_Init, true
"dummy", "SDL dummy audio driver", DUMMYAUDIO_Init, true, false
};
2 changes: 1 addition & 1 deletion src/audio/emscripten/SDL_emscriptenaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ static bool EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap EMSCRIPTENAUDIO_bootstrap = {
"emscripten", "SDL emscripten audio driver", EMSCRIPTENAUDIO_Init, false
"emscripten", "SDL emscripten audio driver", EMSCRIPTENAUDIO_Init, false, false
};

/* *INDENT-ON* */ // clang-format on
Expand Down
2 changes: 1 addition & 1 deletion src/audio/haiku/SDL_haikuaudio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static bool HAIKUAUDIO_Init(SDL_AudioDriverImpl *impl)
extern "C" { extern AudioBootStrap HAIKUAUDIO_bootstrap; }

AudioBootStrap HAIKUAUDIO_bootstrap = {
"haiku", "Haiku BSoundPlayer", HAIKUAUDIO_Init, false
"haiku", "Haiku BSoundPlayer", HAIKUAUDIO_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_HAIKU
2 changes: 1 addition & 1 deletion src/audio/jack/SDL_jackaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ static bool JACK_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap JACK_bootstrap = {
"jack", "JACK Audio Connection Kit", JACK_Init, false
"jack", "JACK Audio Connection Kit", JACK_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_JACK
3 changes: 2 additions & 1 deletion src/audio/n3ds/SDL_n3dsaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ AudioBootStrap N3DSAUDIO_bootstrap = {
N3DSAUDIO_DRIVER_NAME,
"SDL N3DS audio driver",
N3DSAUDIO_Init,
0
false,
false
};

#endif // SDL_AUDIO_DRIVER_N3DS
2 changes: 1 addition & 1 deletion src/audio/netbsd/SDL_netbsdaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static bool NETBSDAUDIO_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap NETBSDAUDIO_bootstrap = {
"netbsd", "NetBSD audio", NETBSDAUDIO_Init, false
"netbsd", "NetBSD audio", NETBSDAUDIO_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_NETBSD
2 changes: 1 addition & 1 deletion src/audio/openslES/SDL_openslES.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ static bool OPENSLES_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap OPENSLES_bootstrap = {
"openslES", "OpenSL ES audio driver", OPENSLES_Init, false
"openslES", "OpenSL ES audio driver", OPENSLES_Init, false, false
};

void OPENSLES_ResumeDevices(void)
Expand Down
2 changes: 1 addition & 1 deletion src/audio/pipewire/SDL_pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ AudioBootStrap PIPEWIRE_PREFERRED_bootstrap = {
"pipewire", "Pipewire", PIPEWIRE_PREFERRED_Init, false, true
};
AudioBootStrap PIPEWIRE_bootstrap = {
"pipewire", "Pipewire", PIPEWIRE_Init, false
"pipewire", "Pipewire", PIPEWIRE_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_PIPEWIRE
2 changes: 1 addition & 1 deletion src/audio/ps2/SDL_ps2audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,5 @@ static bool PS2AUDIO_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap PS2AUDIO_bootstrap = {
"ps2", "PS2 audio driver", PS2AUDIO_Init, false
"ps2", "PS2 audio driver", PS2AUDIO_Init, false, false
};
2 changes: 1 addition & 1 deletion src/audio/psp/SDL_pspaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static bool PSPAUDIO_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap PSPAUDIO_bootstrap = {
"psp", "PSP audio driver", PSPAUDIO_Init, false
"psp", "PSP audio driver", PSPAUDIO_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_PSP
2 changes: 1 addition & 1 deletion src/audio/pulseaudio/SDL_pulseaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ static bool PULSEAUDIO_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap PULSEAUDIO_bootstrap = {
"pulseaudio", "PulseAudio", PULSEAUDIO_Init, false
"pulseaudio", "PulseAudio", PULSEAUDIO_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_PULSEAUDIO
2 changes: 1 addition & 1 deletion src/audio/qnx/SDL_qsa_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ static bool QSA_Init(SDL_AudioDriverImpl * impl)
}

AudioBootStrap QSAAUDIO_bootstrap = {
"qsa", "QNX QSA Audio", QSA_Init, 0
"qsa", "QNX QSA Audio", QSA_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_QNX
Expand Down
2 changes: 1 addition & 1 deletion src/audio/sndio/SDL_sndioaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ static bool SNDIO_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap SNDIO_bootstrap = {
"sndio", "OpenBSD sndio", SNDIO_Init, false
"sndio", "OpenBSD sndio", SNDIO_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_SNDIO
2 changes: 1 addition & 1 deletion src/audio/vita/SDL_vitaaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static bool VITAAUD_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap VITAAUD_bootstrap = {
"vita", "VITA audio driver", VITAAUD_Init, false
"vita", "VITA audio driver", VITAAUD_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_VITA
2 changes: 1 addition & 1 deletion src/audio/wasapi/SDL_wasapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ static bool WASAPI_Init(SDL_AudioDriverImpl *impl)
}

AudioBootStrap WASAPI_bootstrap = {
"wasapi", "WASAPI", WASAPI_Init, false
"wasapi", "WASAPI", WASAPI_Init, false, false
};

#endif // SDL_AUDIO_DRIVER_WASAPI
3 changes: 2 additions & 1 deletion src/video/android/SDL_androidvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ static SDL_VideoDevice *Android_CreateDevice(void)
VideoBootStrap Android_bootstrap = {
ANDROID_VID_DRIVER_NAME, "SDL Android video driver",
Android_CreateDevice,
Android_ShowMessageBox
Android_ShowMessageBox,
false
};

bool Android_VideoInit(SDL_VideoDevice *_this)
Expand Down
3 changes: 2 additions & 1 deletion src/video/cocoa/SDL_cocoavideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ static void Cocoa_DeleteDevice(SDL_VideoDevice *device)
VideoBootStrap COCOA_bootstrap = {
"cocoa", "SDL Cocoa video driver",
Cocoa_CreateDevice,
Cocoa_ShowMessageBox
Cocoa_ShowMessageBox,
false
};

static bool Cocoa_VideoInit(SDL_VideoDevice *_this)
Expand Down
6 changes: 4 additions & 2 deletions src/video/dummy/SDL_nullvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ static SDL_VideoDevice *DUMMY_CreateDevice(void)
VideoBootStrap DUMMY_bootstrap = {
DUMMYVID_DRIVER_NAME, "SDL dummy video driver",
DUMMY_CreateDevice,
NULL // no ShowMessageBox implementation
NULL, // no ShowMessageBox implementation
false
};

#ifdef SDL_INPUT_LINUXEV
Expand All @@ -144,7 +145,8 @@ static SDL_VideoDevice *DUMMY_EVDEV_CreateDevice(void)
VideoBootStrap DUMMY_evdev_bootstrap = {
DUMMYVID_DRIVER_EVDEV_NAME, "SDL dummy video driver with evdev",
DUMMY_EVDEV_CreateDevice,
NULL // no ShowMessageBox implementation
NULL, // no ShowMessageBox implementation
false
};

#endif // SDL_INPUT_LINUXEV
Expand Down
3 changes: 2 additions & 1 deletion src/video/emscripten/SDL_emscriptenvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ static SDL_VideoDevice *Emscripten_CreateDevice(void)
VideoBootStrap Emscripten_bootstrap = {
EMSCRIPTENVID_DRIVER_NAME, "SDL emscripten video driver",
Emscripten_CreateDevice,
NULL // no ShowMessageBox implementation
NULL, // no ShowMessageBox implementation
false
};

bool Emscripten_VideoInit(SDL_VideoDevice *_this)
Expand Down
3 changes: 2 additions & 1 deletion src/video/haiku/SDL_bvideo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ static SDL_VideoDevice * HAIKU_CreateDevice(void)
VideoBootStrap HAIKU_bootstrap = {
"haiku", "Haiku graphics",
HAIKU_CreateDevice,
HAIKU_ShowMessageBox
HAIKU_ShowMessageBox,
false
};

void HAIKU_DeleteDevice(SDL_VideoDevice * device)
Expand Down
3 changes: 2 additions & 1 deletion src/video/kmsdrm/SDL_kmsdrmvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ VideoBootStrap KMSDRM_bootstrap = {
"kmsdrm",
"KMS/DRM Video Driver",
KMSDRM_CreateDevice,
NULL // no ShowMessageBox implementation
NULL, // no ShowMessageBox implementation
false
};

static void KMSDRM_FBDestroyCallback(struct gbm_bo *bo, void *data)
Expand Down
2 changes: 1 addition & 1 deletion src/video/n3ds/SDL_n3dsvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static SDL_VideoDevice *N3DS_CreateDevice(void)
return device;
}

VideoBootStrap N3DS_bootstrap = { N3DSVID_DRIVER_NAME, "N3DS Video Driver", N3DS_CreateDevice, NULL /* no ShowMessageBox implementation */ };
VideoBootStrap N3DS_bootstrap = { N3DSVID_DRIVER_NAME, "N3DS Video Driver", N3DS_CreateDevice, NULL, /* no ShowMessageBox implementation */ false };

static bool N3DS_VideoInit(SDL_VideoDevice *_this)
{
Expand Down
3 changes: 2 additions & 1 deletion src/video/offscreen/SDL_offscreenvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ static SDL_VideoDevice *OFFSCREEN_CreateDevice(void)
VideoBootStrap OFFSCREEN_bootstrap = {
OFFSCREENVID_DRIVER_NAME, "SDL offscreen video driver",
OFFSCREEN_CreateDevice,
NULL // no ShowMessageBox implementation
NULL, // no ShowMessageBox implementation
false
};

static bool OFFSCREEN_VideoInit(SDL_VideoDevice *_this)
Expand Down
2 changes: 1 addition & 1 deletion src/video/openvr/SDL_openvrvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ static SDL_VideoDevice *OPENVR_CreateDevice(void)
}

VideoBootStrap OPENVR_bootstrap = {
"openvr", "SDL OpenVR video driver", OPENVR_CreateDevice
"openvr", "SDL OpenVR video driver", OPENVR_CreateDevice, NULL, false
};

#endif // SDL_VIDEO_DRIVER_WINDOWS
Expand Down
3 changes: 2 additions & 1 deletion src/video/ps2/SDL_ps2video.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ VideoBootStrap PS2_bootstrap = {
"ps2",
"PS2 Video Driver",
PS2_CreateDevice,
NULL // no ShowMessageBox implementation
NULL, // no ShowMessageBox implementation
false
};

#endif // SDL_VIDEO_DRIVER_PS2
3 changes: 2 additions & 1 deletion src/video/psp/SDL_pspvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ VideoBootStrap PSP_bootstrap = {
"psp",
"PSP Video Driver",
PSP_Create,
PSP_ShowMessageBox
PSP_ShowMessageBox,
false
};

/*****************************************************************************/
Expand Down
3 changes: 2 additions & 1 deletion src/video/qnx/SDL_qnxvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,5 +346,6 @@ static SDL_VideoDevice *createDevice(void)
VideoBootStrap QNX_bootstrap = {
"qnx", "QNX Screen",
createDevice,
NULL // no ShowMessageBox implementation
NULL, // no ShowMessageBox implementation
false
};
3 changes: 2 additions & 1 deletion src/video/raspberry/SDL_rpivideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ VideoBootStrap RPI_bootstrap = {
"rpi",
"RPI Video Driver",
RPI_Create,
NULL // no ShowMessageBox implementation
NULL, // no ShowMessageBox implementation
false
};

/*****************************************************************************/
Expand Down
3 changes: 2 additions & 1 deletion src/video/riscos/SDL_riscosvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ static SDL_VideoDevice *RISCOS_CreateDevice(void)
VideoBootStrap RISCOS_bootstrap = {
RISCOSVID_DRIVER_NAME, "SDL RISC OS video driver",
RISCOS_CreateDevice,
RISCOS_ShowMessageBox
RISCOS_ShowMessageBox,
false
};

static bool RISCOS_VideoInit(SDL_VideoDevice *_this)
Expand Down
3 changes: 2 additions & 1 deletion src/video/uikit/SDL_uikitvideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ static void UIKit_DeleteDevice(SDL_VideoDevice *device)
VideoBootStrap UIKIT_bootstrap = {
UIKITVID_DRIVER_NAME, "SDL UIKit video driver",
UIKit_CreateDevice,
UIKit_ShowMessageBox
UIKit_ShowMessageBox,
false
};

static bool UIKit_VideoInit(SDL_VideoDevice *_this)
Expand Down
3 changes: 2 additions & 1 deletion src/video/vita/SDL_vitavideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ VideoBootStrap VITA_bootstrap = {
"vita",
"VITA Video Driver",
VITA_Create,
VITA_ShowMessageBox
VITA_ShowMessageBox,
false
};

/*****************************************************************************/
Expand Down
3 changes: 2 additions & 1 deletion src/video/vivante/SDL_vivantevideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ VideoBootStrap VIVANTE_bootstrap = {
"vivante",
"Vivante EGL Video Driver",
VIVANTE_Create,
NULL // no ShowMessageBox implementation
NULL, // no ShowMessageBox implementation
false
};

/*****************************************************************************/
Expand Down
3 changes: 2 additions & 1 deletion src/video/wayland/SDL_waylandvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,8 @@ VideoBootStrap Wayland_preferred_bootstrap = {
VideoBootStrap Wayland_bootstrap = {
WAYLANDVID_DRIVER_NAME, "SDL Wayland video driver",
Wayland_Fallback_CreateDevice,
Wayland_ShowMessageBox
Wayland_ShowMessageBox,
false
};

static void xdg_output_handle_logical_position(void *data, struct zxdg_output_v1 *xdg_output,
Expand Down
5 changes: 3 additions & 2 deletions src/video/windows/SDL_windowsvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,11 @@ static SDL_VideoDevice *WIN_CreateDevice(void)
VideoBootStrap WINDOWS_bootstrap = {
"windows", "SDL Windows video driver", WIN_CreateDevice,
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
WIN_ShowMessageBox
WIN_ShowMessageBox,
#else
NULL
NULL,
#endif
false
};

static BOOL WIN_DeclareDPIAwareUnaware(SDL_VideoDevice *_this)
Expand Down
3 changes: 2 additions & 1 deletion src/video/x11/SDL_x11video.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ static SDL_VideoDevice *X11_CreateDevice(void)
VideoBootStrap X11_bootstrap = {
"x11", "SDL X11 video driver",
X11_CreateDevice,
X11_ShowMessageBox
X11_ShowMessageBox,
false
};

static int (*handler)(Display *, XErrorEvent *) = NULL;
Expand Down

0 comments on commit 4d4af22

Please sign in to comment.