Some warning clean-up



hi there,
  I'm using drivel-2.0.2. Compiling
it under OpenBSD 3.9 I had some warnings
which are easy to resolve.

I'm posting here my patch 'cause this's
not properly a bug so this'd be the right
place to talk about it.

In order to let drivel compile on OpenBSD
the patch I proposed here has to be applied:
http://bugzilla.gnome.org/show_bug.cgi?id=335704

anyway Todd has just commited it.

Here are the changes:

--- src/dialogs.c.orig  Tue Jul 25 10:00:42 2006
+++ src/dialogs.c       Tue Jul 25 10:01:01 2006
@@ -1782,16 +1782,16 @@
        static GtkWidget *dialog = NULL;
        GtkWidget *widget, *spellcheck;
        GtkListStore *picture_store;
-       GtkTreeIter iter;
        GtkCellRenderer *renderer;
        gboolean state;
        gchar *string;
        gint num;
 #ifdef HAVE_GTKSPELL
+       GtkTreeIter iter;
        gint sel = -1;
        GtkListStore *language_store;
-#endif /* HAVE_GTKSPELL */
        GSList *list;
+#endif /* HAVE_GTKSPELL */
        GConfValue *value;

        if (dialog)

--- src/journal.c.orig  Tue Jul 25 10:52:02 2006
+++ src/journal.c       Tue Jul 25 10:51:42 2006
@@ -1779,6 +1779,7 @@
        return;
 }

+#ifdef HAVE_GTKSPELL
 static void
 spell_language_select_menuitem (DrivelClient *dc, const gchar *lang)
 {
@@ -1817,6 +1818,7 @@

        return;
 }
+#endif /* HAVE_GTKSPELL */

 static void
spell_language_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer user_data)
--- src/main.c.orig     Tue Jul 25 10:32:17 2006
+++ src/main.c  Tue Jul 25 10:33:18 2006
@@ -915,9 +915,11 @@
                { NULL }
        };

+#ifdef ENABLE_NLS
        bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
        textdomain (GETTEXT_PACKAGE);
+#endif
        xmlInitParser ();

        error = NULL;

--- src/query_music_players.c.orig      Tue Jul 25 09:55:45 2006
+++ src/query_music_players.c   Tue Jul 25 09:55:21 2006
@@ -48,10 +48,12 @@
 static gchar
 *beep_query (void);

+#ifdef HAVE_RHYTHMBOX
 static gboolean
 rhythmbox_init (gpointer **ptr);
 static gchar
 *rhythmbox_query (gpointer *ptr);
+#endif
 /* ---- end definitions ---- */

 void
@@ -59,7 +61,9 @@
 {
        gboolean entries;
        GdkPixbuf *pixbuf;
+#ifdef HAVE_RHYTHMBOX
        gpointer *ptr;
+#endif

        gtk_list_store_clear (playing);
        entries = FALSE;

--- src/xmlrpc.c.orig   Tue Jul 25 10:22:55 2006
+++ src/xmlrpc.c        Tue Jul 25 10:30:42 2006
@@ -92,7 +92,8 @@
                        {
                                value = g_new0 (gchar, 32);
                                value_time = va_arg (*args, GTimeVal);
- strftime (value, 32, "%Y%m%dT%H:%M:%S", localtime (&value_time.tv_sec));
+                               time_t time = value_time.tv_sec;
+ strftime (value, 32, "%Y%m%dT%H:%M:%S", localtime (&time)); xmlNewTextChild (xml_value, NULL, "dateTime.iso8601", value);
                                g_free (value);
                                break;
@@ -384,8 +385,9 @@
 {
        xmlNodePtr parent;
        xmlChar content[32];
+       time_t time = value.tv_sec;

- strftime (content, 32, "%Y%m%dT%H:%M:%S", localtime (&value.tv_sec));
+       strftime (content, 32, "%Y%m%dT%H:%M:%S", localtime (&time));
        parent = xmlNewNode (NULL, "value");
        xmlNewTextChild (parent, NULL, "dateTime.iso8601", content);


What do you think about?

Cheers,
bugant.



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