Re: [Patch] Warning fixes



degger fhm edu writes:

> Hija,
> 
> another buch of fixes for you:
> 
> 2001-11-13  Daniel Egger  <degger fhm edu>
> 
>         * gdk/gdkglobals.c: Don't use GDKVAR for gdk_threads_mutex as it
>         will add an extern to the declaration.

This is wrong. GDKVAR is needed on Win32 .. the right thing here is
to define GDKVAR differently in this case... Tim did a fix like
this for some stuff in GTK+ recently.
 
>         * gdk/gdkpixbuf-drawable.c: Properly cast pointers to avoid warnings
>         on BIGENDIAN machines.

Did you read the discussion here? This patch looks like it just
hides broken code.
 
>         * gdk-pixbuf/io-xpm.c: 
>         (xpm_skip_whitespaces): Remove unused static function.
>         (xpm_skip_string): Dito.        
>         (xpm_extract_color): Declare const variable const to avoid warnings. 

This looks fine.

>         * gtk/gtkclist.c: Remove unused variable declarations. 
> 
>         * gtk/gtkcolorsel.c: (gtk_color_selection_get_palette_size): Remove
>         unused static function and prototype.
>         (gtk_color_selection_get_palette_color): Dito.
>         (gtk_color_selection_unset_palette_color): Dito.
>         (palette_unset_color): Dito.
> 
>         * gtk/gtkcontainer.c: Comment out variable definition and calculation
>         just used in commented-out g_print.

Hmm, I didn't mean to commit that stuff at all. Backed out now.
 
>         * gtk/gtkfixed.c: (gtk_fixed_map): Remove unused static function.

Fine.
         
>         * gtk/gtkplug.c: #if 0'ed prototype for #if 0'ed code.

Fine.
         
>         * gtk/gtksocket.c: Change type of mask to g_message to %ld for 
>         a long.

Fine.

And your patch includes two changes not mentioned above:


Index: gtk/gtktextiter.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktextiter.c,v
retrieving revision 1.60
diff -u -r1.60 gtktextiter.c
--- gtk/gtktextiter.c	2001/11/10 22:06:37	1.60
+++ gtk/gtktextiter.c	2001/11/13 22:22:03
@@ -1813,50 +1813,6 @@
 }
 
 
-/* The return value of this indicates WHETHER WE MOVED.
- * The return value of public functions indicates
- * (MOVEMENT OCCURRED && NEW ITER IS DEREFERENCEABLE)
- */
-static gboolean
-backward_line_leaving_caches_unmodified (GtkTextRealIter *real)
-{
-  GtkTextLine *new_line;
-
-  new_line = _gtk_text_line_previous (real->line);
-
-  g_assert (new_line != real->line);
-
-  if (new_line != NULL)
-    {
-      real->line = new_line;
-
-      real->line_byte_offset = 0;
-      real->line_char_offset = 0;
-
-      real->segment_byte_offset = 0;
-      real->segment_char_offset = 0;
-
-      /* Find first segments in new line */
-      real->any_segment = real->line->segments;
-      real->segment = real->any_segment;
-      while (real->segment->char_count == 0)
-        real->segment = real->segment->next;
-
-      return TRUE;
-    }
-  else
-    {
-      /* There is no way to move backward; we were already
-         at the first line. */
-
-      /* We leave real->line as-is */
-
-      /* Note that we didn't clamp to the start of the first line. */
-
-      return FALSE;
-    }
-}
-
 /* The return value indicates (MOVEMENT OCCURRED && NEW ITER IS
  * DEREFERENCEABLE)
  */

Havoc assures me that he'll #if 0 this out with the appropriate
comment.

Index: gtk/gtktreeview.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktreeview.c,v
retrieving revision 1.169
diff -u -r1.169 gtktreeview.c
--- gtk/gtktreeview.c	2001/11/06 19:10:02	1.169
+++ gtk/gtktreeview.c	2001/11/13 22:22:25
@@ -3012,41 +3012,6 @@
   return FALSE;
 }
 
-/* Incremental Reflow */
-
-static void
-validate_visible_area (GtkTreeView *tree_view)
-{
-
-}
-
-static gboolean
-validate_rows_handler (GtkTreeView *tree_view)
-{
-  g_assert (tree_view);
-
-  g_return_val_if_fail (tree_view->priv->tree != NULL, TRUE);
-
-  if (! GTK_RBNODE_FLAG_SET (tree_view->priv->tree->root, GTK_RBNODE_DESCENDANTS_INVALID))
-    return TRUE;
-
-
-  return TRUE;
-}
-
-static gboolean
-presize_handler_callback (gpointer data)
-{
-
-  return TRUE;
-}
-
-static void
-install_presize_handler (GtkTreeView *tree_view)
-{
-
-}
-

Jonathan is busy working on this code portion, so making this
change would just cause conflicts.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]