Skip to content

Commit 4d4af22

Browse files
Kontrabantmupfdev
authored andcommitted
audio/video: Fix uninitialized field warnings
1 parent 23522a0 commit 4d4af22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+63
-43
lines changed

src/audio/aaudio/SDL_aaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ static bool AAUDIO_Init(SDL_AudioDriverImpl *impl)
545545
}
546546

547547
AudioBootStrap AAUDIO_bootstrap = {
548-
"AAudio", "AAudio audio driver", AAUDIO_Init, false
548+
"AAudio", "AAudio audio driver", AAUDIO_Init, false, false
549549
};
550550

551551
#endif // SDL_AUDIO_DRIVER_AAUDIO

src/audio/alsa/SDL_alsa_audio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ static bool ALSA_Init(SDL_AudioDriverImpl *impl)
15131513
}
15141514

15151515
AudioBootStrap ALSA_bootstrap = {
1516-
"alsa", "ALSA PCM audio", ALSA_Init, false
1516+
"alsa", "ALSA PCM audio", ALSA_Init, false, false
15171517
};
15181518

15191519
#endif // SDL_AUDIO_DRIVER_ALSA

src/audio/coreaudio/SDL_coreaudio.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ static bool COREAUDIO_Init(SDL_AudioDriverImpl *impl)
10341034
}
10351035

10361036
AudioBootStrap COREAUDIO_bootstrap = {
1037-
"coreaudio", "CoreAudio", COREAUDIO_Init, false
1037+
"coreaudio", "CoreAudio", COREAUDIO_Init, false, false
10381038
};
10391039

10401040
#endif // SDL_AUDIO_DRIVER_COREAUDIO

src/audio/directsound/SDL_directsound.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ static bool DSOUND_Init(SDL_AudioDriverImpl *impl)
674674
}
675675

676676
AudioBootStrap DSOUND_bootstrap = {
677-
"directsound", "DirectSound", DSOUND_Init, false
677+
"directsound", "DirectSound", DSOUND_Init, false, false
678678
};
679679

680680
#endif // SDL_AUDIO_DRIVER_DSOUND

src/audio/disk/SDL_diskaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static bool DISKAUDIO_Init(SDL_AudioDriverImpl *impl)
165165
}
166166

167167
AudioBootStrap DISKAUDIO_bootstrap = {
168-
"disk", "direct-to-disk audio", DISKAUDIO_Init, true
168+
"disk", "direct-to-disk audio", DISKAUDIO_Init, true, false
169169
};
170170

171171
#endif // SDL_AUDIO_DRIVER_DISK

src/audio/dsp/SDL_dspaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static bool DSP_Init(SDL_AudioDriverImpl *impl)
297297
}
298298

299299
AudioBootStrap DSP_bootstrap = {
300-
"dsp", "Open Sound System (/dev/dsp)", DSP_Init, false
300+
"dsp", "Open Sound System (/dev/dsp)", DSP_Init, false, false
301301
};
302302

303303
#endif // SDL_AUDIO_DRIVER_OSS

src/audio/dummy/SDL_dummyaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,5 @@ static bool DUMMYAUDIO_Init(SDL_AudioDriverImpl *impl)
131131
}
132132

133133
AudioBootStrap DUMMYAUDIO_bootstrap = {
134-
"dummy", "SDL dummy audio driver", DUMMYAUDIO_Init, true
134+
"dummy", "SDL dummy audio driver", DUMMYAUDIO_Init, true, false
135135
};

src/audio/emscripten/SDL_emscriptenaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ static bool EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl *impl)
351351
}
352352

353353
AudioBootStrap EMSCRIPTENAUDIO_bootstrap = {
354-
"emscripten", "SDL emscripten audio driver", EMSCRIPTENAUDIO_Init, false
354+
"emscripten", "SDL emscripten audio driver", EMSCRIPTENAUDIO_Init, false, false
355355
};
356356

357357
/* *INDENT-ON* */ // clang-format on

src/audio/haiku/SDL_haikuaudio.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static bool HAIKUAUDIO_Init(SDL_AudioDriverImpl *impl)
216216
extern "C" { extern AudioBootStrap HAIKUAUDIO_bootstrap; }
217217

218218
AudioBootStrap HAIKUAUDIO_bootstrap = {
219-
"haiku", "Haiku BSoundPlayer", HAIKUAUDIO_Init, false
219+
"haiku", "Haiku BSoundPlayer", HAIKUAUDIO_Init, false, false
220220
};
221221

222222
#endif // SDL_AUDIO_DRIVER_HAIKU

src/audio/jack/SDL_jackaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ static bool JACK_Init(SDL_AudioDriverImpl *impl)
429429
}
430430

431431
AudioBootStrap JACK_bootstrap = {
432-
"jack", "JACK Audio Connection Kit", JACK_Init, false
432+
"jack", "JACK Audio Connection Kit", JACK_Init, false, false
433433
};
434434

435435
#endif // SDL_AUDIO_DRIVER_JACK

src/audio/n3ds/SDL_n3dsaudio.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ AudioBootStrap N3DSAUDIO_bootstrap = {
280280
N3DSAUDIO_DRIVER_NAME,
281281
"SDL N3DS audio driver",
282282
N3DSAUDIO_Init,
283-
0
283+
false,
284+
false
284285
};
285286

286287
#endif // SDL_AUDIO_DRIVER_N3DS

src/audio/netbsd/SDL_netbsdaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static bool NETBSDAUDIO_Init(SDL_AudioDriverImpl *impl)
322322
}
323323

324324
AudioBootStrap NETBSDAUDIO_bootstrap = {
325-
"netbsd", "NetBSD audio", NETBSDAUDIO_Init, false
325+
"netbsd", "NetBSD audio", NETBSDAUDIO_Init, false, false
326326
};
327327

328328
#endif // SDL_AUDIO_DRIVER_NETBSD

src/audio/openslES/SDL_openslES.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ static bool OPENSLES_Init(SDL_AudioDriverImpl *impl)
779779
}
780780

781781
AudioBootStrap OPENSLES_bootstrap = {
782-
"openslES", "OpenSL ES audio driver", OPENSLES_Init, false
782+
"openslES", "OpenSL ES audio driver", OPENSLES_Init, false, false
783783
};
784784

785785
void OPENSLES_ResumeDevices(void)

src/audio/pipewire/SDL_pipewire.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ AudioBootStrap PIPEWIRE_PREFERRED_bootstrap = {
13401340
"pipewire", "Pipewire", PIPEWIRE_PREFERRED_Init, false, true
13411341
};
13421342
AudioBootStrap PIPEWIRE_bootstrap = {
1343-
"pipewire", "Pipewire", PIPEWIRE_Init, false
1343+
"pipewire", "Pipewire", PIPEWIRE_Init, false, false
13441344
};
13451345

13461346
#endif // SDL_AUDIO_DRIVER_PIPEWIRE

src/audio/ps2/SDL_ps2audio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,5 @@ static bool PS2AUDIO_Init(SDL_AudioDriverImpl *impl)
155155
}
156156

157157
AudioBootStrap PS2AUDIO_bootstrap = {
158-
"ps2", "PS2 audio driver", PS2AUDIO_Init, false
158+
"ps2", "PS2 audio driver", PS2AUDIO_Init, false, false
159159
};

src/audio/psp/SDL_pspaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static bool PSPAUDIO_Init(SDL_AudioDriverImpl *impl)
177177
}
178178

179179
AudioBootStrap PSPAUDIO_bootstrap = {
180-
"psp", "PSP audio driver", PSPAUDIO_Init, false
180+
"psp", "PSP audio driver", PSPAUDIO_Init, false, false
181181
};
182182

183183
#endif // SDL_AUDIO_DRIVER_PSP

src/audio/pulseaudio/SDL_pulseaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ static bool PULSEAUDIO_Init(SDL_AudioDriverImpl *impl)
10301030
}
10311031

10321032
AudioBootStrap PULSEAUDIO_bootstrap = {
1033-
"pulseaudio", "PulseAudio", PULSEAUDIO_Init, false
1033+
"pulseaudio", "PulseAudio", PULSEAUDIO_Init, false, false
10341034
};
10351035

10361036
#endif // SDL_AUDIO_DRIVER_PULSEAUDIO

src/audio/qnx/SDL_qsa_audio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ static bool QSA_Init(SDL_AudioDriverImpl * impl)
444444
}
445445

446446
AudioBootStrap QSAAUDIO_bootstrap = {
447-
"qsa", "QNX QSA Audio", QSA_Init, 0
447+
"qsa", "QNX QSA Audio", QSA_Init, false, false
448448
};
449449

450450
#endif // SDL_AUDIO_DRIVER_QNX

src/audio/sndio/SDL_sndioaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ static bool SNDIO_Init(SDL_AudioDriverImpl *impl)
350350
}
351351

352352
AudioBootStrap SNDIO_bootstrap = {
353-
"sndio", "OpenBSD sndio", SNDIO_Init, false
353+
"sndio", "OpenBSD sndio", SNDIO_Init, false, false
354354
};
355355

356356
#endif // SDL_AUDIO_DRIVER_SNDIO

src/audio/vita/SDL_vitaaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static bool VITAAUD_Init(SDL_AudioDriverImpl *impl)
232232
}
233233

234234
AudioBootStrap VITAAUD_bootstrap = {
235-
"vita", "VITA audio driver", VITAAUD_Init, false
235+
"vita", "VITA audio driver", VITAAUD_Init, false, false
236236
};
237237

238238
#endif // SDL_AUDIO_DRIVER_VITA

src/audio/wasapi/SDL_wasapi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ static bool WASAPI_Init(SDL_AudioDriverImpl *impl)
957957
}
958958

959959
AudioBootStrap WASAPI_bootstrap = {
960-
"wasapi", "WASAPI", WASAPI_Init, false
960+
"wasapi", "WASAPI", WASAPI_Init, false, false
961961
};
962962

963963
#endif // SDL_AUDIO_DRIVER_WASAPI

src/video/android/SDL_androidvideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ static SDL_VideoDevice *Android_CreateDevice(void)
157157
VideoBootStrap Android_bootstrap = {
158158
ANDROID_VID_DRIVER_NAME, "SDL Android video driver",
159159
Android_CreateDevice,
160-
Android_ShowMessageBox
160+
Android_ShowMessageBox,
161+
false
161162
};
162163

163164
bool Android_VideoInit(SDL_VideoDevice *_this)

src/video/cocoa/SDL_cocoavideo.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ static void Cocoa_DeleteDevice(SDL_VideoDevice *device)
195195
VideoBootStrap COCOA_bootstrap = {
196196
"cocoa", "SDL Cocoa video driver",
197197
Cocoa_CreateDevice,
198-
Cocoa_ShowMessageBox
198+
Cocoa_ShowMessageBox,
199+
false
199200
};
200201

201202
static bool Cocoa_VideoInit(SDL_VideoDevice *_this)

src/video/dummy/SDL_nullvideo.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ static SDL_VideoDevice *DUMMY_CreateDevice(void)
121121
VideoBootStrap DUMMY_bootstrap = {
122122
DUMMYVID_DRIVER_NAME, "SDL dummy video driver",
123123
DUMMY_CreateDevice,
124-
NULL // no ShowMessageBox implementation
124+
NULL, // no ShowMessageBox implementation
125+
false
125126
};
126127

127128
#ifdef SDL_INPUT_LINUXEV
@@ -144,7 +145,8 @@ static SDL_VideoDevice *DUMMY_EVDEV_CreateDevice(void)
144145
VideoBootStrap DUMMY_evdev_bootstrap = {
145146
DUMMYVID_DRIVER_EVDEV_NAME, "SDL dummy video driver with evdev",
146147
DUMMY_EVDEV_CreateDevice,
147-
NULL // no ShowMessageBox implementation
148+
NULL, // no ShowMessageBox implementation
149+
false
148150
};
149151

150152
#endif // SDL_INPUT_LINUXEV

src/video/emscripten/SDL_emscriptenvideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ static SDL_VideoDevice *Emscripten_CreateDevice(void)
195195
VideoBootStrap Emscripten_bootstrap = {
196196
EMSCRIPTENVID_DRIVER_NAME, "SDL emscripten video driver",
197197
Emscripten_CreateDevice,
198-
NULL // no ShowMessageBox implementation
198+
NULL, // no ShowMessageBox implementation
199+
false
199200
};
200201

201202
bool Emscripten_VideoInit(SDL_VideoDevice *_this)

src/video/haiku/SDL_bvideo.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ static SDL_VideoDevice * HAIKU_CreateDevice(void)
113113
VideoBootStrap HAIKU_bootstrap = {
114114
"haiku", "Haiku graphics",
115115
HAIKU_CreateDevice,
116-
HAIKU_ShowMessageBox
116+
HAIKU_ShowMessageBox,
117+
false
117118
};
118119

119120
void HAIKU_DeleteDevice(SDL_VideoDevice * device)

src/video/kmsdrm/SDL_kmsdrmvideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ VideoBootStrap KMSDRM_bootstrap = {
332332
"kmsdrm",
333333
"KMS/DRM Video Driver",
334334
KMSDRM_CreateDevice,
335-
NULL // no ShowMessageBox implementation
335+
NULL, // no ShowMessageBox implementation
336+
false
336337
};
337338

338339
static void KMSDRM_FBDestroyCallback(struct gbm_bo *bo, void *data)

src/video/n3ds/SDL_n3dsvideo.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static SDL_VideoDevice *N3DS_CreateDevice(void)
118118
return device;
119119
}
120120

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

123123
static bool N3DS_VideoInit(SDL_VideoDevice *_this)
124124
{

src/video/offscreen/SDL_offscreenvideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ static SDL_VideoDevice *OFFSCREEN_CreateDevice(void)
118118
VideoBootStrap OFFSCREEN_bootstrap = {
119119
OFFSCREENVID_DRIVER_NAME, "SDL offscreen video driver",
120120
OFFSCREEN_CreateDevice,
121-
NULL // no ShowMessageBox implementation
121+
NULL, // no ShowMessageBox implementation
122+
false
122123
};
123124

124125
static bool OFFSCREEN_VideoInit(SDL_VideoDevice *_this)

src/video/openvr/SDL_openvrvideo.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ static SDL_VideoDevice *OPENVR_CreateDevice(void)
16571657
}
16581658

16591659
VideoBootStrap OPENVR_bootstrap = {
1660-
"openvr", "SDL OpenVR video driver", OPENVR_CreateDevice
1660+
"openvr", "SDL OpenVR video driver", OPENVR_CreateDevice, NULL, false
16611661
};
16621662

16631663
#endif // SDL_VIDEO_DRIVER_WINDOWS

src/video/ps2/SDL_ps2video.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ VideoBootStrap PS2_bootstrap = {
114114
"ps2",
115115
"PS2 Video Driver",
116116
PS2_CreateDevice,
117-
NULL // no ShowMessageBox implementation
117+
NULL, // no ShowMessageBox implementation
118+
false
118119
};
119120

120121
#endif // SDL_VIDEO_DRIVER_PS2

src/video/psp/SDL_pspvideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ VideoBootStrap PSP_bootstrap = {
265265
"psp",
266266
"PSP Video Driver",
267267
PSP_Create,
268-
PSP_ShowMessageBox
268+
PSP_ShowMessageBox,
269+
false
269270
};
270271

271272
/*****************************************************************************/

src/video/qnx/SDL_qnxvideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -346,5 +346,6 @@ static SDL_VideoDevice *createDevice(void)
346346
VideoBootStrap QNX_bootstrap = {
347347
"qnx", "QNX Screen",
348348
createDevice,
349-
NULL // no ShowMessageBox implementation
349+
NULL, // no ShowMessageBox implementation
350+
false
350351
};

src/video/raspberry/SDL_rpivideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ VideoBootStrap RPI_bootstrap = {
135135
"rpi",
136136
"RPI Video Driver",
137137
RPI_Create,
138-
NULL // no ShowMessageBox implementation
138+
NULL, // no ShowMessageBox implementation
139+
false
139140
};
140141

141142
/*****************************************************************************/

src/video/riscos/SDL_riscosvideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ static SDL_VideoDevice *RISCOS_CreateDevice(void)
9696
VideoBootStrap RISCOS_bootstrap = {
9797
RISCOSVID_DRIVER_NAME, "SDL RISC OS video driver",
9898
RISCOS_CreateDevice,
99-
RISCOS_ShowMessageBox
99+
RISCOS_ShowMessageBox,
100+
false
100101
};
101102

102103
static bool RISCOS_VideoInit(SDL_VideoDevice *_this)

src/video/uikit/SDL_uikitvideo.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ static void UIKit_DeleteDevice(SDL_VideoDevice *device)
144144
VideoBootStrap UIKIT_bootstrap = {
145145
UIKITVID_DRIVER_NAME, "SDL UIKit video driver",
146146
UIKit_CreateDevice,
147-
UIKit_ShowMessageBox
147+
UIKit_ShowMessageBox,
148+
false
148149
};
149150

150151
static bool UIKit_VideoInit(SDL_VideoDevice *_this)

src/video/vita/SDL_vitavideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ VideoBootStrap VITA_bootstrap = {
160160
"vita",
161161
"VITA Video Driver",
162162
VITA_Create,
163-
VITA_ShowMessageBox
163+
VITA_ShowMessageBox,
164+
false
164165
};
165166

166167
/*****************************************************************************/

src/video/vivante/SDL_vivantevideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ VideoBootStrap VIVANTE_bootstrap = {
107107
"vivante",
108108
"Vivante EGL Video Driver",
109109
VIVANTE_Create,
110-
NULL // no ShowMessageBox implementation
110+
NULL, // no ShowMessageBox implementation
111+
false
111112
};
112113

113114
/*****************************************************************************/

src/video/wayland/SDL_waylandvideo.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,8 @@ VideoBootStrap Wayland_preferred_bootstrap = {
692692
VideoBootStrap Wayland_bootstrap = {
693693
WAYLANDVID_DRIVER_NAME, "SDL Wayland video driver",
694694
Wayland_Fallback_CreateDevice,
695-
Wayland_ShowMessageBox
695+
Wayland_ShowMessageBox,
696+
false
696697
};
697698

698699
static void xdg_output_handle_logical_position(void *data, struct zxdg_output_v1 *xdg_output,

src/video/windows/SDL_windowsvideo.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,11 @@ static SDL_VideoDevice *WIN_CreateDevice(void)
330330
VideoBootStrap WINDOWS_bootstrap = {
331331
"windows", "SDL Windows video driver", WIN_CreateDevice,
332332
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
333-
WIN_ShowMessageBox
333+
WIN_ShowMessageBox,
334334
#else
335-
NULL
335+
NULL,
336336
#endif
337+
false
337338
};
338339

339340
static BOOL WIN_DeclareDPIAwareUnaware(SDL_VideoDevice *_this)

src/video/x11/SDL_x11video.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ static SDL_VideoDevice *X11_CreateDevice(void)
271271
VideoBootStrap X11_bootstrap = {
272272
"x11", "SDL X11 video driver",
273273
X11_CreateDevice,
274-
X11_ShowMessageBox
274+
X11_ShowMessageBox,
275+
false
275276
};
276277

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

0 commit comments

Comments
 (0)