Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fix sdl-haiku buildbot compiler warnings

  • Loading branch information
ferzkopp committed Oct 30, 2011
1 parent 83af410 commit 93c63d5c60fe55707baf10a2beeef639132b2dc5
@@ -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
@@ -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;
@@ -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) {
@@ -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);
@@ -47,6 +47,7 @@ int BE_SetClipboardText(_THIS, const char *text) {
}
be_clipboard->Unlock();
}
return 0;
}

char *BE_GetClipboardText(_THIS) {
@@ -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()) {
@@ -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;
@@ -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,
@@ -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) {
@@ -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)

0 comments on commit 93c63d5

Please sign in to comment.