Use proper struct initializers and remove INIT_FIELD() macro
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
		
							parent
							
								
									c981d39c95
								
							
						
					
					
						commit
						bee37f32d4
					
				@ -983,15 +983,15 @@ static struct audio_pcm_ops alsa_pcm_ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct audio_driver alsa_audio_driver = {
 | 
					struct audio_driver alsa_audio_driver = {
 | 
				
			||||||
    INIT_FIELD (name           = ) "alsa",
 | 
					    .name           = "alsa",
 | 
				
			||||||
    INIT_FIELD (descr          = ) "ALSA http://www.alsa-project.org",
 | 
					    .descr          = "ALSA http://www.alsa-project.org",
 | 
				
			||||||
    INIT_FIELD (options        = ) alsa_options,
 | 
					    .options        = alsa_options,
 | 
				
			||||||
    INIT_FIELD (init           = ) alsa_audio_init,
 | 
					    .init           = alsa_audio_init,
 | 
				
			||||||
    INIT_FIELD (fini           = ) alsa_audio_fini,
 | 
					    .fini           = alsa_audio_fini,
 | 
				
			||||||
    INIT_FIELD (pcm_ops        = ) &alsa_pcm_ops,
 | 
					    .pcm_ops        = &alsa_pcm_ops,
 | 
				
			||||||
    INIT_FIELD (can_be_default = ) 1,
 | 
					    .can_be_default = 1,
 | 
				
			||||||
    INIT_FIELD (max_voices_out = ) INT_MAX,
 | 
					    .max_voices_out = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (max_voices_in  = ) INT_MAX,
 | 
					    .max_voices_in  = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (voice_size_out = ) sizeof (ALSAVoiceOut),
 | 
					    .voice_size_out = sizeof (ALSAVoiceOut),
 | 
				
			||||||
    INIT_FIELD (voice_size_in  = ) sizeof (ALSAVoiceIn)
 | 
					    .voice_size_in  = sizeof (ALSAVoiceIn)
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -232,11 +232,9 @@ static inline int audio_ring_dist (int dst, int src, int len)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#if defined __GNUC__
 | 
					#if defined __GNUC__
 | 
				
			||||||
#define GCC_ATTR __attribute__ ((__unused__, __format__ (__printf__, 1, 2)))
 | 
					#define GCC_ATTR __attribute__ ((__unused__, __format__ (__printf__, 1, 2)))
 | 
				
			||||||
#define INIT_FIELD(f) . f
 | 
					 | 
				
			||||||
#define GCC_FMT_ATTR(n, m) __attribute__ ((__format__ (__printf__, n, m)))
 | 
					#define GCC_FMT_ATTR(n, m) __attribute__ ((__format__ (__printf__, n, m)))
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#define GCC_ATTR /**/
 | 
					#define GCC_ATTR /**/
 | 
				
			||||||
#define INIT_FIELD(f) /**/
 | 
					 | 
				
			||||||
#define GCC_FMT_ATTR(n, m)
 | 
					#define GCC_FMT_ATTR(n, m)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -535,16 +535,15 @@ static struct audio_pcm_ops coreaudio_pcm_ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct audio_driver coreaudio_audio_driver = {
 | 
					struct audio_driver coreaudio_audio_driver = {
 | 
				
			||||||
    INIT_FIELD (name           = ) "coreaudio",
 | 
					    .name           = "coreaudio",
 | 
				
			||||||
    INIT_FIELD (descr          = )
 | 
					    .descr          = "CoreAudio http://developer.apple.com/audio/coreaudio.html",
 | 
				
			||||||
    "CoreAudio http://developer.apple.com/audio/coreaudio.html",
 | 
					    .options        = coreaudio_options,
 | 
				
			||||||
    INIT_FIELD (options        = ) coreaudio_options,
 | 
					    .init           = coreaudio_audio_init,
 | 
				
			||||||
    INIT_FIELD (init           = ) coreaudio_audio_init,
 | 
					    .fini           = coreaudio_audio_fini,
 | 
				
			||||||
    INIT_FIELD (fini           = ) coreaudio_audio_fini,
 | 
					    .pcm_ops        = &coreaudio_pcm_ops,
 | 
				
			||||||
    INIT_FIELD (pcm_ops        = ) &coreaudio_pcm_ops,
 | 
					    .can_be_default = 1,
 | 
				
			||||||
    INIT_FIELD (can_be_default = ) 1,
 | 
					    .max_voices_out = 1,
 | 
				
			||||||
    INIT_FIELD (max_voices_out = ) 1,
 | 
					    .max_voices_in  = 0,
 | 
				
			||||||
    INIT_FIELD (max_voices_in  = ) 0,
 | 
					    .voice_size_out = sizeof (coreaudioVoiceOut),
 | 
				
			||||||
    INIT_FIELD (voice_size_out = ) sizeof (coreaudioVoiceOut),
 | 
					    .voice_size_in  = 0
 | 
				
			||||||
    INIT_FIELD (voice_size_in  = ) 0
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -1073,16 +1073,15 @@ static struct audio_pcm_ops dsound_pcm_ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct audio_driver dsound_audio_driver = {
 | 
					struct audio_driver dsound_audio_driver = {
 | 
				
			||||||
    INIT_FIELD (name           = ) "dsound",
 | 
					    .name           = "dsound",
 | 
				
			||||||
    INIT_FIELD (descr          = )
 | 
					    .descr          = "DirectSound http://wikipedia.org/wiki/DirectSound",
 | 
				
			||||||
    "DirectSound http://wikipedia.org/wiki/DirectSound",
 | 
					    .options        = dsound_options,
 | 
				
			||||||
    INIT_FIELD (options        = ) dsound_options,
 | 
					    .init           = dsound_audio_init,
 | 
				
			||||||
    INIT_FIELD (init           = ) dsound_audio_init,
 | 
					    .fini           = dsound_audio_fini,
 | 
				
			||||||
    INIT_FIELD (fini           = ) dsound_audio_fini,
 | 
					    .pcm_ops        = &dsound_pcm_ops,
 | 
				
			||||||
    INIT_FIELD (pcm_ops        = ) &dsound_pcm_ops,
 | 
					    .can_be_default = 1,
 | 
				
			||||||
    INIT_FIELD (can_be_default = ) 1,
 | 
					    .max_voices_out = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (max_voices_out = ) INT_MAX,
 | 
					    .max_voices_in  = 1,
 | 
				
			||||||
    INIT_FIELD (max_voices_in  = ) 1,
 | 
					    .voice_size_out = sizeof (DSoundVoiceOut),
 | 
				
			||||||
    INIT_FIELD (voice_size_out = ) sizeof (DSoundVoiceOut),
 | 
					    .oice_size_in   = sizeof (DSoundVoiceIn)
 | 
				
			||||||
    INIT_FIELD (voice_size_in  = ) sizeof (DSoundVoiceIn)
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -581,16 +581,15 @@ static struct audio_pcm_ops qesd_pcm_ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct audio_driver esd_audio_driver = {
 | 
					struct audio_driver esd_audio_driver = {
 | 
				
			||||||
    INIT_FIELD (name           = ) "esd",
 | 
					    .name           = "esd",
 | 
				
			||||||
    INIT_FIELD (descr          = )
 | 
					    .descr          = "http://en.wikipedia.org/wiki/Esound",
 | 
				
			||||||
    "http://en.wikipedia.org/wiki/Esound",
 | 
					    .options        = qesd_options,
 | 
				
			||||||
    INIT_FIELD (options        = ) qesd_options,
 | 
					    .init           = qesd_audio_init,
 | 
				
			||||||
    INIT_FIELD (init           = ) qesd_audio_init,
 | 
					    .fini           = qesd_audio_fini,
 | 
				
			||||||
    INIT_FIELD (fini           = ) qesd_audio_fini,
 | 
					    .pcm_ops        = &qesd_pcm_ops,
 | 
				
			||||||
    INIT_FIELD (pcm_ops        = ) &qesd_pcm_ops,
 | 
					    .can_be_default = 0,
 | 
				
			||||||
    INIT_FIELD (can_be_default = ) 0,
 | 
					    .max_voices_out = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (max_voices_out = ) INT_MAX,
 | 
					    .max_voices_in  = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (max_voices_in  = ) INT_MAX,
 | 
					    .voice_size_out = sizeof (ESDVoiceOut),
 | 
				
			||||||
    INIT_FIELD (voice_size_out = ) sizeof (ESDVoiceOut),
 | 
					    .voice_size_in  = sizeof (ESDVoiceIn)
 | 
				
			||||||
    INIT_FIELD (voice_size_in  = ) sizeof (ESDVoiceIn)
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -672,15 +672,15 @@ static struct audio_pcm_ops fmod_pcm_ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct audio_driver fmod_audio_driver = {
 | 
					struct audio_driver fmod_audio_driver = {
 | 
				
			||||||
    INIT_FIELD (name           = ) "fmod",
 | 
					    .name           = "fmod",
 | 
				
			||||||
    INIT_FIELD (descr          = ) "FMOD 3.xx http://www.fmod.org",
 | 
					    .descr          = "FMOD 3.xx http://www.fmod.org",
 | 
				
			||||||
    INIT_FIELD (options        = ) fmod_options,
 | 
					    .options        = fmod_options,
 | 
				
			||||||
    INIT_FIELD (init           = ) fmod_audio_init,
 | 
					    .init           = fmod_audio_init,
 | 
				
			||||||
    INIT_FIELD (fini           = ) fmod_audio_fini,
 | 
					    .fini           = fmod_audio_fini,
 | 
				
			||||||
    INIT_FIELD (pcm_ops        = ) &fmod_pcm_ops,
 | 
					    .pcm_ops        = &fmod_pcm_ops,
 | 
				
			||||||
    INIT_FIELD (can_be_default = ) 1,
 | 
					    .can_be_default = 1,
 | 
				
			||||||
    INIT_FIELD (max_voices_out = ) INT_MAX,
 | 
					    .max_voices_out = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (max_voices_in  = ) INT_MAX,
 | 
					    .max_voices_in  = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (voice_size_out = ) sizeof (FMODVoiceOut),
 | 
					    .voice_size_out = sizeof (FMODVoiceOut),
 | 
				
			||||||
    INIT_FIELD (voice_size_in  = ) sizeof (FMODVoiceIn)
 | 
					    .voice_size_in  = sizeof (FMODVoiceIn)
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -160,15 +160,15 @@ static struct audio_pcm_ops no_pcm_ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct audio_driver no_audio_driver = {
 | 
					struct audio_driver no_audio_driver = {
 | 
				
			||||||
    INIT_FIELD (name           = ) "none",
 | 
					    .name           = "none",
 | 
				
			||||||
    INIT_FIELD (descr          = ) "Timer based audio emulation",
 | 
					    .descr          = "Timer based audio emulation",
 | 
				
			||||||
    INIT_FIELD (options        = ) NULL,
 | 
					    .options        = NULL,
 | 
				
			||||||
    INIT_FIELD (init           = ) no_audio_init,
 | 
					    .init           = no_audio_init,
 | 
				
			||||||
    INIT_FIELD (fini           = ) no_audio_fini,
 | 
					    .fini           = no_audio_fini,
 | 
				
			||||||
    INIT_FIELD (pcm_ops        = ) &no_pcm_ops,
 | 
					    .pcm_ops        = &no_pcm_ops,
 | 
				
			||||||
    INIT_FIELD (can_be_default = ) 1,
 | 
					    .can_be_default = 1,
 | 
				
			||||||
    INIT_FIELD (max_voices_out = ) INT_MAX,
 | 
					    .max_voices_out = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (max_voices_in  = ) INT_MAX,
 | 
					    .max_voices_in  = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (voice_size_out = ) sizeof (NoVoiceOut),
 | 
					    .voice_size_out = sizeof (NoVoiceOut),
 | 
				
			||||||
    INIT_FIELD (voice_size_in  = ) sizeof (NoVoiceIn)
 | 
					    .voice_size_in  = sizeof (NoVoiceIn)
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -766,15 +766,15 @@ static struct audio_pcm_ops oss_pcm_ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct audio_driver oss_audio_driver = {
 | 
					struct audio_driver oss_audio_driver = {
 | 
				
			||||||
    INIT_FIELD (name           = ) "oss",
 | 
					    .name           = "oss",
 | 
				
			||||||
    INIT_FIELD (descr          = ) "OSS http://www.opensound.com",
 | 
					    .descr          = "OSS http://www.opensound.com",
 | 
				
			||||||
    INIT_FIELD (options        = ) oss_options,
 | 
					    .options        = oss_options,
 | 
				
			||||||
    INIT_FIELD (init           = ) oss_audio_init,
 | 
					    .init           = oss_audio_init,
 | 
				
			||||||
    INIT_FIELD (fini           = ) oss_audio_fini,
 | 
					    .fini           = oss_audio_fini,
 | 
				
			||||||
    INIT_FIELD (pcm_ops        = ) &oss_pcm_ops,
 | 
					    .pcm_ops        = &oss_pcm_ops,
 | 
				
			||||||
    INIT_FIELD (can_be_default = ) 1,
 | 
					    .can_be_default = 1,
 | 
				
			||||||
    INIT_FIELD (max_voices_out = ) INT_MAX,
 | 
					    .max_voices_out = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (max_voices_in  = ) INT_MAX,
 | 
					    .max_voices_in  = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (voice_size_out = ) sizeof (OSSVoiceOut),
 | 
					    .voice_size_out = sizeof (OSSVoiceOut),
 | 
				
			||||||
    INIT_FIELD (voice_size_in  = ) sizeof (OSSVoiceIn)
 | 
					    .voice_size_in  = sizeof (OSSVoiceIn)
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -501,15 +501,15 @@ static struct audio_pcm_ops qpa_pcm_ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct audio_driver pa_audio_driver = {
 | 
					struct audio_driver pa_audio_driver = {
 | 
				
			||||||
    INIT_FIELD (name           = ) "pa",
 | 
					    .name           = "pa",
 | 
				
			||||||
    INIT_FIELD (descr          = ) "http://www.pulseaudio.org/",
 | 
					    .descr          = "http://www.pulseaudio.org/",
 | 
				
			||||||
    INIT_FIELD (options        = ) qpa_options,
 | 
					    .options        = qpa_options,
 | 
				
			||||||
    INIT_FIELD (init           = ) qpa_audio_init,
 | 
					    .init           = qpa_audio_init,
 | 
				
			||||||
    INIT_FIELD (fini           = ) qpa_audio_fini,
 | 
					    .fini           = qpa_audio_fini,
 | 
				
			||||||
    INIT_FIELD (pcm_ops        = ) &qpa_pcm_ops,
 | 
					    .pcm_ops        = &qpa_pcm_ops,
 | 
				
			||||||
    INIT_FIELD (can_be_default = ) 0,
 | 
					    .can_be_default = 0,
 | 
				
			||||||
    INIT_FIELD (max_voices_out = ) INT_MAX,
 | 
					    .max_voices_out = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (max_voices_in  = ) INT_MAX,
 | 
					    .max_voices_in  = INT_MAX,
 | 
				
			||||||
    INIT_FIELD (voice_size_out = ) sizeof (PAVoiceOut),
 | 
					    .voice_size_out = sizeof (PAVoiceOut),
 | 
				
			||||||
    INIT_FIELD (voice_size_in  = ) sizeof (PAVoiceIn)
 | 
					    .voice_size_in  = sizeof (PAVoiceIn)
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -440,15 +440,15 @@ static struct audio_pcm_ops sdl_pcm_ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct audio_driver sdl_audio_driver = {
 | 
					struct audio_driver sdl_audio_driver = {
 | 
				
			||||||
    INIT_FIELD (name           = ) "sdl",
 | 
					    .name           = "sdl",
 | 
				
			||||||
    INIT_FIELD (descr          = ) "SDL http://www.libsdl.org",
 | 
					    .descr          = "SDL http://www.libsdl.org",
 | 
				
			||||||
    INIT_FIELD (options        = ) sdl_options,
 | 
					    .options        = sdl_options,
 | 
				
			||||||
    INIT_FIELD (init           = ) sdl_audio_init,
 | 
					    .init           = sdl_audio_init,
 | 
				
			||||||
    INIT_FIELD (fini           = ) sdl_audio_fini,
 | 
					    .fini           = sdl_audio_fini,
 | 
				
			||||||
    INIT_FIELD (pcm_ops        = ) &sdl_pcm_ops,
 | 
					    .pcm_ops        = &sdl_pcm_ops,
 | 
				
			||||||
    INIT_FIELD (can_be_default = ) 1,
 | 
					    .can_be_default = 1,
 | 
				
			||||||
    INIT_FIELD (max_voices_out = ) 1,
 | 
					    .max_voices_out = 1,
 | 
				
			||||||
    INIT_FIELD (max_voices_in  = ) 0,
 | 
					    .max_voices_in  = 0,
 | 
				
			||||||
    INIT_FIELD (voice_size_out = ) sizeof (SDLVoiceOut),
 | 
					    .voice_size_out = sizeof (SDLVoiceOut),
 | 
				
			||||||
    INIT_FIELD (voice_size_in  = ) 0
 | 
					    .voice_size_in  = 0
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -248,16 +248,15 @@ static struct audio_pcm_ops wav_pcm_ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct audio_driver wav_audio_driver = {
 | 
					struct audio_driver wav_audio_driver = {
 | 
				
			||||||
    INIT_FIELD (name           = ) "wav",
 | 
					    .name           = "wav",
 | 
				
			||||||
    INIT_FIELD (descr          = )
 | 
					    .descr          = "WAV renderer http://wikipedia.org/wiki/WAV",
 | 
				
			||||||
    "WAV renderer http://wikipedia.org/wiki/WAV",
 | 
					    .options        = wav_options,
 | 
				
			||||||
    INIT_FIELD (options        = ) wav_options,
 | 
					    .init           = wav_audio_init,
 | 
				
			||||||
    INIT_FIELD (init           = ) wav_audio_init,
 | 
					    .fini           = wav_audio_fini,
 | 
				
			||||||
    INIT_FIELD (fini           = ) wav_audio_fini,
 | 
					    .pcm_ops = &wav_pcm_ops,
 | 
				
			||||||
    INIT_FIELD (pcm_ops        = ) &wav_pcm_ops,
 | 
					    .can_be_default = 0,
 | 
				
			||||||
    INIT_FIELD (can_be_default = ) 0,
 | 
					    .max_voices_out = 1,
 | 
				
			||||||
    INIT_FIELD (max_voices_out = ) 1,
 | 
					    .max_voices_in  = 0,
 | 
				
			||||||
    INIT_FIELD (max_voices_in  = ) 0,
 | 
					    .voice_size_out = sizeof (WAVVoiceOut),
 | 
				
			||||||
    INIT_FIELD (voice_size_out = ) sizeof (WAVVoiceOut),
 | 
					    .voice_size_in  = 0
 | 
				
			||||||
    INIT_FIELD (voice_size_in  = ) 0
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user