[broadway] Fix all unnecessary warnings

This commit is contained in:
Alexander Larsson 2011-04-06 22:23:35 +02:00
parent 3b1fe05e78
commit 43aac66458
5 changed files with 5 additions and 22 deletions

View File

@ -18,12 +18,14 @@
static const char base64_alphabet[] = static const char base64_alphabet[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
#if 0 /* Unused for now */
static void static void
base64_uint8 (guint8 v, char *c) base64_uint8 (guint8 v, char *c)
{ {
c[0] = base64_alphabet[(v >> 0) & 0x3f]; c[0] = base64_alphabet[(v >> 0) & 0x3f];
c[1] = base64_alphabet[(v >> 6) & 0x3]; c[1] = base64_alphabet[(v >> 6) & 0x3];
} }
#endif
static void static void
base64_uint16 (guint32 v, char *c) base64_uint16 (guint32 v, char *c)

View File

@ -759,6 +759,9 @@ got_request (HttpRequest *request)
start_input (request); start_input (request);
else else
send_error (request, 404, "File not found"); send_error (request, 404, "File not found");
g_free (escaped);
g_free (version);
} }
static void static void

View File

@ -93,13 +93,10 @@ _gdk_broadway_events_got_input (GdkDisplay *display,
BroadwayInputMsg *message) BroadwayInputMsg *message)
{ {
GdkBroadwayDisplay *display_broadway = GDK_BROADWAY_DISPLAY (display); GdkBroadwayDisplay *display_broadway = GDK_BROADWAY_DISPLAY (display);
GdkScreen *screen;
GdkWindow *window; GdkWindow *window;
GdkEvent *event = NULL; GdkEvent *event = NULL;
GList *node; GList *node;
screen = gdk_display_get_default_screen (display);
display_broadway->last_event_time = message->base.time; display_broadway->last_event_time = message->base.time;
switch (message->base.type) { switch (message->base.type) {

View File

@ -237,12 +237,8 @@ _gdk_broadway_screen_setup (GdkScreen *screen)
static gboolean static gboolean
gdk_broadway_screen_is_composited (GdkScreen *screen) gdk_broadway_screen_is_composited (GdkScreen *screen)
{ {
GdkBroadwayScreen *broadway_screen;
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE); g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
broadway_screen = GDK_BROADWAY_SCREEN (screen);
return FALSE; return FALSE;
} }

View File

@ -329,12 +329,10 @@ _gdk_broadway_display_create_window_impl (GdkDisplay *display,
gint attributes_mask) gint attributes_mask)
{ {
GdkWindowImplBroadway *impl; GdkWindowImplBroadway *impl;
GdkBroadwayScreen *broadway_screen;
GdkBroadwayDisplay *broadway_display; GdkBroadwayDisplay *broadway_display;
static int current_id = 1; /* 0 is the root window */ static int current_id = 1; /* 0 is the root window */
broadway_display = GDK_BROADWAY_DISPLAY (display); broadway_display = GDK_BROADWAY_DISPLAY (display);
broadway_screen = GDK_BROADWAY_SCREEN (screen);
impl = g_object_new (GDK_TYPE_WINDOW_IMPL_BROADWAY, NULL); impl = g_object_new (GDK_TYPE_WINDOW_IMPL_BROADWAY, NULL);
window->impl = (GdkWindowImpl *)impl; window->impl = (GdkWindowImpl *)impl;
@ -515,10 +513,6 @@ gdk_broadway_window_destroy_foreign (GdkWindow *window)
static void static void
gdk_broadway_window_destroy_notify (GdkWindow *window) gdk_broadway_window_destroy_notify (GdkWindow *window)
{ {
GdkWindowImplBroadway *window_impl;
window_impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
if (!GDK_WINDOW_DESTROYED (window)) if (!GDK_WINDOW_DESTROYED (window))
{ {
if (GDK_WINDOW_TYPE(window) != GDK_WINDOW_FOREIGN) if (GDK_WINDOW_TYPE(window) != GDK_WINDOW_FOREIGN)
@ -1009,14 +1003,10 @@ static void
gdk_broadway_window_set_icon_name (GdkWindow *window, gdk_broadway_window_set_icon_name (GdkWindow *window,
const gchar *name) const gchar *name)
{ {
GdkDisplay *display;
if (GDK_WINDOW_DESTROYED (window) || if (GDK_WINDOW_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
return; return;
display = gdk_window_get_display (window);
g_object_set_qdata (G_OBJECT (window), g_quark_from_static_string ("gdk-icon-name-set"), g_object_set_qdata (G_OBJECT (window), g_quark_from_static_string ("gdk-icon-name-set"),
GUINT_TO_POINTER (name != NULL)); GUINT_TO_POINTER (name != NULL));
} }
@ -1235,21 +1225,16 @@ static void
gdk_broadway_window_set_opacity (GdkWindow *window, gdk_broadway_window_set_opacity (GdkWindow *window,
gdouble opacity) gdouble opacity)
{ {
GdkDisplay *display;
g_return_if_fail (GDK_IS_WINDOW (window)); g_return_if_fail (GDK_IS_WINDOW (window));
if (GDK_WINDOW_DESTROYED (window) || if (GDK_WINDOW_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window)) !WINDOW_IS_TOPLEVEL (window))
return; return;
display = gdk_window_get_display (window);
if (opacity < 0) if (opacity < 0)
opacity = 0; opacity = 0;
else if (opacity > 1) else if (opacity > 1)
opacity = 1; opacity = 1;
} }
static void static void