Fix more compilation warnings SDL-1.2
authorPatrice Mandin <patmandin@gmail.com>
Sun, 28 Aug 2011 17:20:12 +0200
branchSDL-1.2
changeset 5653 9a7d629b403a
parent 5652 16ad54affe84
child 5654 06067f7eadfa
Fix more compilation warnings
src/audio/mint/SDL_mintaudio_stfa.c
src/audio/mint/SDL_mintaudio_xbios.c
src/cdrom/mint/SDL_syscdrom.c
src/joystick/mint/SDL_sysjoystick.c
src/timer/mint/SDL_systimer.c
src/video/ataricommon/SDL_atarievents.c
src/video/gem/SDL_gemvideo.c
src/video/xbios/SDL_xbios.c
src/video/xbios/SDL_xbios_tveille.c
--- a/src/audio/mint/SDL_mintaudio_stfa.c	Sun Aug 28 17:19:32 2011 +0200
+++ b/src/audio/mint/SDL_mintaudio_stfa.c	Sun Aug 28 17:20:12 2011 +0200
@@ -59,7 +59,7 @@
 
 /*--- Static variables ---*/
 
-static unsigned long cookie_snd, cookie_mch;
+static long cookie_snd, cookie_mch;
 static cookie_stfa_t *cookie_stfa;
 
 static const int freqs[16]={
@@ -84,7 +84,7 @@
 
 static int Audio_Available(void)
 {
-	unsigned long dummy;
+	long dummy;
 	const char *envr = SDL_getenv("SDL_AUDIODRIVER");
 
 	/* Check if user asked a different audio driver */
--- a/src/audio/mint/SDL_mintaudio_xbios.c	Sun Aug 28 17:19:32 2011 +0200
+++ b/src/audio/mint/SDL_mintaudio_xbios.c	Sun Aug 28 17:20:12 2011 +0200
@@ -62,7 +62,7 @@
 
 /*--- Static variables ---*/
 
-static unsigned long cookie_snd;
+static long cookie_snd;
 
 /*--- Audio driver functions ---*/
 
@@ -265,14 +265,10 @@
 {
 #define SIZE_BUF_CLOCK_MEASURE (44100/10)
 
-	unsigned long cookie_snd;
 	char *buffer;
 	int i, j;
 
 	/* DSP present with its GPIO port ? */
-	if (Getcookie(C__SND, &cookie_snd) == C_NOTFOUND) {
-		return;
-	}
 	if ((cookie_snd & SND_DSP)==0) {
 		return;
 	}
--- a/src/cdrom/mint/SDL_syscdrom.c	Sun Aug 28 17:19:32 2011 +0200
+++ b/src/cdrom/mint/SDL_syscdrom.c	Sun Aug 28 17:20:12 2011 +0200
@@ -49,7 +49,7 @@
 #define MAX_DRIVES	32	
 
 typedef struct {
-	unsigned char device[3];	/* Physical device letter + ':' + '\0' */
+	char		device[3];	/* Physical device letter + ':' + '\0' */
 	metaopen_t	metaopen;		/* Infos on opened drive */
 } metados_drive_t;
 
--- a/src/joystick/mint/SDL_sysjoystick.c	Sun Aug 28 17:19:32 2011 +0200
+++ b/src/joystick/mint/SDL_sysjoystick.c	Sun Aug 28 17:20:12 2011 +0200
@@ -206,7 +206,7 @@
 
 typedef struct {
 	SDL_bool enabled;
-	unsigned char *name;
+	char *name;
 	Uint32 prevstate;
 } atarijoy_t;
 
@@ -264,7 +264,7 @@
 int SDL_SYS_JoystickInit(void)
 {
 	int i;
-	unsigned long cookie_mch;
+	long cookie_mch;
 	const char *envr=SDL_getenv("SDL_JOYSTICK_ATARI");
 	
 #define TEST_JOY_ENABLED(env,idstring,num) \
--- a/src/timer/mint/SDL_systimer.c	Sun Aug 28 17:19:32 2011 +0200
+++ b/src/timer/mint/SDL_systimer.c	Sun Aug 28 17:20:12 2011 +0200
@@ -59,7 +59,7 @@
 void SDL_StartTicks(void)
 {
 	void *old_stack;
-	unsigned long dummy;
+	long dummy;
 
 	/* Set first ticks value */
 	old_stack = (void *)Super(0);
--- a/src/video/ataricommon/SDL_atarievents.c	Sun Aug 28 17:19:32 2011 +0200
+++ b/src/video/ataricommon/SDL_atarievents.c	Sun Aug 28 17:20:12 2011 +0200
@@ -52,14 +52,14 @@
 
 /* The translation tables from a console scancode to a SDL keysym */
 static SDLKey keymap[ATARIBIOS_MAXKEYS];
-static unsigned char *keytab_normal;
+static char *keytab_normal;
 
 void (*Atari_ShutdownEvents)(void);
 
 static void Atari_InitializeEvents(_THIS)
 {
 	const char *envr;
-	unsigned long cookie_mch;
+	long cookie_mch;
 
 	/* Test if we are on an Atari machine or not */
 	if (Getcookie(C__MCH, &cookie_mch) == C_NOTFOUND) {
--- a/src/video/gem/SDL_gemvideo.c	Sun Aug 28 17:19:32 2011 +0200
+++ b/src/video/gem/SDL_gemvideo.c	Sun Aug 28 17:20:12 2011 +0200
@@ -73,7 +73,7 @@
 	9, 10, 11, 14, 12, 15, 13, 255
 };
 
-static const unsigned char empty_name[]="";
+static const char empty_name[]="";
 
 /* Initialization/Query functions */
 static int GEM_VideoInit(_THIS, SDL_PixelFormat *vformat);
@@ -216,7 +216,7 @@
 static void VDI_ReadExtInfo(_THIS, short *work_out)
 {
 	unsigned long EdDI_version;
-	unsigned long cookie_EdDI;
+	long cookie_EdDI;
 	Uint32 num_colours;
 	Uint16 clut_type, num_bits;
 
--- a/src/video/xbios/SDL_xbios.c	Sun Aug 28 17:19:32 2011 +0200
+++ b/src/video/xbios/SDL_xbios.c	Sun Aug 28 17:20:12 2011 +0200
@@ -138,8 +138,8 @@
 
 static int XBIOS_Available(void)
 {
-	unsigned long cookie_vdo, /*cookie_mil,*/ cookie_hade, cookie_scpn;
-	unsigned long cookie_fvdi;
+	long cookie_vdo, /*cookie_mil,*/ cookie_hade, cookie_scpn;
+	long cookie_fvdi;
 	const char *envr = SDL_getenv("SDL_VIDEODRIVER");
 
 	/* Milan/Hades Atari clones do not have an Atari video chip */
@@ -362,7 +362,7 @@
 static int XBIOS_VideoInit(_THIS, SDL_PixelFormat *vformat)
 {
 	int i;
-	unsigned long cookie_blow, cookie_scpn, cookie_cnts;
+	long cookie_blow, cookie_scpn, cookie_cnts;
 
 	/* Initialize all variables that we clean on shutdown */
 	for ( i=0; i<NUM_MODELISTS; ++i ) {
--- a/src/video/xbios/SDL_xbios_tveille.c	Sun Aug 28 17:19:32 2011 +0200
+++ b/src/video/xbios/SDL_xbios_tveille.c	Sun Aug 28 17:20:12 2011 +0200
@@ -37,7 +37,7 @@
 
 int SDL_XBIOS_TveillePresent(_THIS)
 {
-	unsigned long dummy;
+	long dummy;
 
 	cookie_veil = NULL;
 	if (Getcookie(C_VeiL, &dummy) == C_FOUND) {