Fix sdl-haiku buildbot compiler warnings
authorAndreas Schiffler <aschiffler@ferzkopp.net>
Sun, 30 Oct 2011 00:19:13 -0700
changeset 60372feab4874268
parent 6036 f2a89f2a6157
child 6038 3e0f5912363d
Fix sdl-haiku buildbot compiler warnings
src/main/beos/SDL_BApp.h
src/video/SDL_bmp.c
src/video/bwindow/SDL_BWin.h
src/video/bwindow/SDL_bclipboard.cc
src/video/bwindow/SDL_bframebuffer.cc
src/video/bwindow/SDL_bkeyboard.cc
src/video/bwindow/SDL_bmodes.cc
src/video/bwindow/SDL_bopengl.cc
     1.1 --- a/src/main/beos/SDL_BApp.h	Sat Oct 29 23:43:59 2011 -0700
     1.2 +++ b/src/main/beos/SDL_BApp.h	Sun Oct 30 00:19:13 2011 -0700
     1.3 @@ -175,6 +175,9 @@
     1.4      		_PushBackWindow(win);
     1.5      		return i;
     1.6      	}
     1.7 +    	
     1.8 +    	/* TODO: error handling */
     1.9 +    	return 0;
    1.10      }
    1.11      
    1.12      /* FIXME: Bad coding practice, but I can't include SDL_BWin.h here.  Is
     2.1 --- a/src/video/SDL_bmp.c	Sat Oct 29 23:43:59 2011 -0700
     2.2 +++ b/src/video/SDL_bmp.c	Sun Oct 30 00:19:13 2011 -0700
     2.3 @@ -49,7 +49,7 @@
     2.4  SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
     2.5  {
     2.6      SDL_bool was_error;
     2.7 -    long fp_offset;
     2.8 +    long fp_offset = 0;
     2.9      int bmpPitch;
    2.10      int i, pad;
    2.11      SDL_Surface *surface;
     3.1 --- a/src/video/bwindow/SDL_BWin.h	Sat Oct 29 23:43:59 2011 -0700
     3.2 +++ b/src/video/bwindow/SDL_BWin.h	Sun Oct 30 00:19:13 2011 -0700
     3.3 @@ -300,7 +300,6 @@
     3.4          
     3.5          switch (msg->what) {
     3.6          case B_MOUSE_MOVED:
     3.7 -            where;
     3.8              int32 transit;
     3.9              if (msg->FindPoint("where", &where) == B_OK
    3.10                  && msg->FindInt32("be:transit", &transit) == B_OK) {
    3.11 @@ -440,7 +439,6 @@
    3.12      			_MouseFocusEvent(false);
    3.13      		}
    3.14      	} else {
    3.15 -    		static int x = 0, y = 0;
    3.16      		/* Change mouse focus */
    3.17      		if (!_mouse_focused) {
    3.18      			_MouseFocusEvent(true);
     4.1 --- a/src/video/bwindow/SDL_bclipboard.cc	Sat Oct 29 23:43:59 2011 -0700
     4.2 +++ b/src/video/bwindow/SDL_bclipboard.cc	Sun Oct 30 00:19:13 2011 -0700
     4.3 @@ -47,6 +47,7 @@
     4.4  		}
     4.5  		be_clipboard->Unlock();
     4.6  	}
     4.7 +	return 0;
     4.8  }
     4.9  
    4.10  char *BE_GetClipboardText(_THIS) {
     5.1 --- a/src/video/bwindow/SDL_bframebuffer.cc	Sat Oct 29 23:43:59 2011 -0700
     5.2 +++ b/src/video/bwindow/SDL_bframebuffer.cc	Sun Oct 30 00:19:13 2011 -0700
     5.3 @@ -115,7 +115,6 @@
     5.4  
     5.5  int32 BE_DrawThread(void *data) {
     5.6  	SDL_BWin *bwin = (SDL_BWin*)data;
     5.7 -	SDL_Window *window = _GetBeApp()->GetSDLWindow(bwin->GetID());
     5.8  	
     5.9  	BScreen bscreen;
    5.10  	if(!bscreen.IsValid()) {
     6.1 --- a/src/video/bwindow/SDL_bkeyboard.cc	Sat Oct 29 23:43:59 2011 -0700
     6.2 +++ b/src/video/bwindow/SDL_bkeyboard.cc	Sun Oct 30 00:19:13 2011 -0700
     6.3 @@ -158,7 +158,7 @@
     6.4  }
     6.5  
     6.6  SDL_Scancode BE_GetScancodeFromBeKey(int32 bkey) {
     6.7 -	if(bkey > 0 && bkey < SDL_TABLESIZE(keymap)) {
     6.8 +	if(bkey > 0 && bkey < (int32)SDL_TABLESIZE(keymap)) {
     6.9  		return keymap[bkey];
    6.10  	} else {
    6.11  		return SDL_SCANCODE_UNKNOWN;
     7.1 --- a/src/video/bwindow/SDL_bmodes.cc	Sat Oct 29 23:43:59 2011 -0700
     7.2 +++ b/src/video/bwindow/SDL_bmodes.cc	Sun Oct 30 00:19:13 2011 -0700
     7.3 @@ -184,6 +184,10 @@
     7.4  		return SDL_PIXELFORMAT_INDEX4LSB;
     7.5  		break;
     7.6  	}
     7.7 +
     7.8 +	/* May never get here, but safer and needed to shut up compiler */
     7.9 +	SDL_SetError("Invalid bpp value");
    7.10 +	return 0;       
    7.11  }
    7.12  
    7.13  static void _BDisplayModeToSdlDisplayMode(display_mode *bmode,
    7.14 @@ -236,6 +240,7 @@
    7.15  	/* TODO: When Haiku supports multiple display screens, call
    7.16  	   _AddDisplayScreen() for each of them. */
    7.17  	_AddDisplay(&screen);
    7.18 +	return 0;
    7.19  }
    7.20  
    7.21  int BE_QuitModes(_THIS) {
     8.1 --- a/src/video/bwindow/SDL_bopengl.cc	Sat Oct 29 23:43:59 2011 -0700
     8.2 +++ b/src/video/bwindow/SDL_bopengl.cc	Sun Oct 30 00:19:13 2011 -0700
     8.3 @@ -59,6 +59,7 @@
     8.4  					SDL_arraysize(_this->gl_config.driver_path));
     8.5  		}
     8.6  	}
     8.7 +	return 0;
     8.8  }
     8.9  
    8.10  void *BE_GL_GetProcAddress(_THIS, const char *proc)