Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix sdl-haiku buildbot compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ferzkopp committed Oct 30, 2011
1 parent 83af410 commit 93c63d5
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/main/beos/SDL_BApp.h
Expand Up @@ -175,6 +175,9 @@ class SDL_BApp : public BApplication {
_PushBackWindow(win);
return i;
}

/* TODO: error handling */
return 0;
}

/* FIXME: Bad coding practice, but I can't include SDL_BWin.h here. Is
Expand Down
2 changes: 1 addition & 1 deletion src/video/SDL_bmp.c
Expand Up @@ -49,7 +49,7 @@ SDL_Surface *
SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
{
SDL_bool was_error;
long fp_offset;
long fp_offset = 0;
int bmpPitch;
int i, pad;
SDL_Surface *surface;
Expand Down
2 changes: 0 additions & 2 deletions src/video/bwindow/SDL_BWin.h
Expand Up @@ -300,7 +300,6 @@ class SDL_BWin:public BDirectWindow

switch (msg->what) {
case B_MOUSE_MOVED:
where;
int32 transit;
if (msg->FindPoint("where", &where) == B_OK
&& msg->FindInt32("be:transit", &transit) == B_OK) {
Expand Down Expand Up @@ -440,7 +439,6 @@ class SDL_BWin:public BDirectWindow
_MouseFocusEvent(false);
}
} else {
static int x = 0, y = 0;
/* Change mouse focus */
if (!_mouse_focused) {
_MouseFocusEvent(true);
Expand Down
1 change: 1 addition & 0 deletions src/video/bwindow/SDL_bclipboard.cc
Expand Up @@ -47,6 +47,7 @@ int BE_SetClipboardText(_THIS, const char *text) {
}
be_clipboard->Unlock();
}
return 0;
}

char *BE_GetClipboardText(_THIS) {
Expand Down
1 change: 0 additions & 1 deletion src/video/bwindow/SDL_bframebuffer.cc
Expand Up @@ -115,7 +115,6 @@ int BE_UpdateWindowFramebuffer(_THIS, SDL_Window * window,

int32 BE_DrawThread(void *data) {
SDL_BWin *bwin = (SDL_BWin*)data;
SDL_Window *window = _GetBeApp()->GetSDLWindow(bwin->GetID());

BScreen bscreen;
if(!bscreen.IsValid()) {
Expand Down
2 changes: 1 addition & 1 deletion src/video/bwindow/SDL_bkeyboard.cc
Expand Up @@ -158,7 +158,7 @@ void BE_InitOSKeymap() {
}

SDL_Scancode BE_GetScancodeFromBeKey(int32 bkey) {
if(bkey > 0 && bkey < SDL_TABLESIZE(keymap)) {
if(bkey > 0 && bkey < (int32)SDL_TABLESIZE(keymap)) {
return keymap[bkey];
} else {
return SDL_SCANCODE_UNKNOWN;
Expand Down
5 changes: 5 additions & 0 deletions src/video/bwindow/SDL_bmodes.cc
Expand Up @@ -184,6 +184,10 @@ int32 BE_BPPToSDLPxFormat(int32 bpp) {
return SDL_PIXELFORMAT_INDEX4LSB;
break;
}

/* May never get here, but safer and needed to shut up compiler */
SDL_SetError("Invalid bpp value");
return 0;
}

static void _BDisplayModeToSdlDisplayMode(display_mode *bmode,
Expand Down Expand Up @@ -236,6 +240,7 @@ int BE_InitModes(_THIS) {
/* TODO: When Haiku supports multiple display screens, call
_AddDisplayScreen() for each of them. */
_AddDisplay(&screen);
return 0;
}

int BE_QuitModes(_THIS) {
Expand Down
1 change: 1 addition & 0 deletions src/video/bwindow/SDL_bopengl.cc
Expand Up @@ -59,6 +59,7 @@ int BE_GL_LoadLibrary(_THIS, const char *path)
SDL_arraysize(_this->gl_config.driver_path));
}
}
return 0;
}

void *BE_GL_GetProcAddress(_THIS, const char *proc)
Expand Down

0 comments on commit 93c63d5

Please sign in to comment.