]> www.fi.muni.cz Git - evince.git/commitdiff
Fix gcc 4.0 warnings
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Mon, 6 Jun 2005 20:42:49 +0000 (20:42 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Mon, 6 Jun 2005 20:42:49 +0000 (20:42 +0000)
ChangeLog
cut-n-paste/toolbar-editor/egg-editable-toolbar.c
cut-n-paste/toolbar-editor/egg-toolbar-editor.c
cut-n-paste/toolbar-editor/egg-toolbars-model.c
dvi/pixbuf-device.c

index e20c0df4d6bf78c4ace6b135c6832f157d9475be..7dd1057777ea661efddae025d6abef23e9f90edc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2005-06-07  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * cut-n-paste/toolbar-editor/egg-editable-toolbar.c:
+       (drag_data_get_cb), (drag_data_received_cb):
+       * cut-n-paste/toolbar-editor/egg-toolbar-editor.c:
+       (drag_data_get_cb), (parse_item_list),
+       (egg_toolbar_editor_load_actions):
+       * cut-n-paste/toolbar-editor/egg-toolbars-model.c:
+       (egg_toolbars_model_to_xml), (egg_toolbars_model_save),
+       (parse_item_list), (parse_toolbars):
+       * dvi/pixbuf-device.c: (dvi_pixbuf_draw_rule),
+       (dvi_pixbuf_put_pixel):
+       
+       Fix gcc 4.0 warnings
+
 2005-06-06  Marco Pesenti Gritti <mpg@redhat.com>
 
        * ps/ps-document.c: (start_interpreter):
index a74f4fdfc5fd32de7892697cb8624ec811a019a5..934eb1bab273dcc3ffd995072e2a81b31b6d2439 100644 (file)
@@ -253,7 +253,7 @@ drag_data_get_cb (GtkWidget          *widget,
     }
 
   gtk_selection_data_set (selection_data,
-                         selection_data->target, 8, target, strlen (target));
+                         selection_data->target, 8, (unsigned char *)target, strlen (target));
 
   g_free (target);
 }
@@ -448,7 +448,7 @@ drag_data_received_cb (GtkWidget          *widget,
          
   target = gtk_drag_dest_find_target (widget, context, NULL);
   type = egg_toolbars_model_get_item_type (etoolbar->priv->model, target);
-  id = egg_toolbars_model_get_item_id (etoolbar->priv->model, type, selection_data->data);
+  id = egg_toolbars_model_get_item_id (etoolbar->priv->model, type, (char *)selection_data->data);
 
   /* This function can be called for two reasons
    *
@@ -484,7 +484,7 @@ drag_data_received_cb (GtkWidget          *widget,
       pos = gtk_toolbar_get_drop_index (GTK_TOOLBAR (widget), x, y);
       toolbar_pos = get_toolbar_position (etoolbar, widget);
 
-      if (data_is_separator (selection_data->data))
+      if (data_is_separator ((char *)selection_data->data))
        {
          egg_toolbars_model_add_separator (etoolbar->priv->model,
                                            toolbar_pos, pos);
index f3ba1e94df87a81ed871e37f756622fe9351f6b3..4158d0e6c0e799318b83ee5e2fb935b9a736bf00 100644 (file)
@@ -366,7 +366,7 @@ drag_data_get_cb (GtkWidget          *widget,
     }
 
   gtk_selection_data_set (selection_data,
-                         selection_data->target, 8, target, strlen (target));
+                         selection_data->target, 8, (unsigned char *)target, strlen (target));
 }
 
 static gchar *
@@ -619,12 +619,12 @@ parse_item_list (EggToolbarEditor *t,
 {
   while (child)
     {
-      if (xmlStrEqual (child->name, "toolitem"))
+      if (xmlStrEqual (child->name, (xmlChar *)"toolitem"))
        {
          xmlChar *name;
 
-         name = xmlGetProp (child, "name");
-         egg_toolbar_editor_add_action (t, name);
+         name = xmlGetProp (child, (xmlChar *)"name");
+         egg_toolbar_editor_add_action (t, (char *)name);
          xmlFree (name);
        }
       child = child->next;
@@ -692,7 +692,7 @@ egg_toolbar_editor_load_actions (EggToolbarEditor *editor,
 
   while (child)
     {
-      if (xmlStrEqual (child->name, "available"))
+      if (xmlStrEqual (child->name, (xmlChar *)"available"))
        {
          parse_item_list (editor, child->children);
        }
index 8da9908cde66ecf7ce6fece5093dec5569bd2f49..10208cbbc998e410c9f68d3a64f01bd6fa3927b1 100644 (file)
@@ -110,16 +110,16 @@ egg_toolbars_model_to_xml (EggToolbarsModel *t)
   tl = t->priv->toolbars;
 
   xmlIndentTreeOutput = TRUE;
-  doc = xmlNewDoc ("1.0");
-  doc->children = xmlNewDocNode (doc, NULL, "toolbars", NULL);
+  doc = xmlNewDoc ((xmlChar *)"1.0");
+  doc->children = xmlNewDocNode (doc, NULL, (xmlChar *)"toolbars", NULL);
 
   for (l1 = tl->children; l1 != NULL; l1 = l1->next)
     {
       xmlNodePtr tnode;
       EggToolbarsToolbar *toolbar = l1->data;
 
-      tnode = xmlNewChild (doc->children, NULL, "toolbar", NULL);
-      xmlSetProp (tnode, "name", toolbar->name);
+      tnode = xmlNewChild (doc->children, NULL, (xmlChar *)"toolbar", NULL);
+      xmlSetProp (tnode, (xmlChar *)"name", (xmlChar *)toolbar->name);
 
       for (l2 = l1->children; l2 != NULL; l2 = l2->next)
        {
@@ -128,16 +128,16 @@ egg_toolbars_model_to_xml (EggToolbarsModel *t)
 
          if (item->separator)
            {
-             node = xmlNewChild (tnode, NULL, "separator", NULL);
+             node = xmlNewChild (tnode, NULL, (xmlChar *)"separator", NULL);
            }
          else
            {
              char *data;
 
-             node = xmlNewChild (tnode, NULL, "toolitem", NULL);
+             node = xmlNewChild (tnode, NULL, (xmlChar *)"toolitem", NULL);
              data = egg_toolbars_model_get_item_data (t, item->type, item->id);
-             xmlSetProp (node, "type", item->type);
-             xmlSetProp (node, "name", data);
+             xmlSetProp (node, (xmlChar *)"type", (xmlChar *)item->type);
+             xmlSetProp (node, (xmlChar *)"name", (xmlChar *)data);
              g_free (data);
            }
        }
@@ -214,7 +214,7 @@ egg_toolbars_model_save (EggToolbarsModel *t,
 
   doc = egg_toolbars_model_to_xml (t);
   root = xmlDocGetRootElement (doc);
-  xmlSetProp (root, "version", version);
+  xmlSetProp (root, (xmlChar *)"version", (xmlChar *)version);
   safe_save_xml (xml_file, doc);
   xmlFreeDoc (doc);
 }
@@ -365,31 +365,31 @@ parse_item_list (EggToolbarsModel *t,
 {
   while (child)
     {
-      if (xmlStrEqual (child->name, "toolitem"))
+      if (xmlStrEqual (child->name, (xmlChar *)"toolitem"))
        {
          xmlChar *name, *type;
          char *id;
 
-         name = xmlGetProp (child, "name");
-         type = xmlGetProp (child, "type");
+         name = xmlGetProp (child, (xmlChar *)"name");
+         type = xmlGetProp (child, (xmlChar *)"type");
           if (type == NULL)
             {
-              type = xmlStrdup (EGG_TOOLBAR_ITEM_TYPE);
+              type = xmlStrdup ((xmlChar *)EGG_TOOLBAR_ITEM_TYPE);
             }
 
          if (name != NULL && name[0] != '\0' && type != NULL)
            {
-              id = egg_toolbars_model_get_item_id (t, type, name);
+              id = egg_toolbars_model_get_item_id (t, (char *)type, (char *)name);
              if (id != NULL)
                {
-                 egg_toolbars_model_add_item (t, position, -1, id, type);
+                 egg_toolbars_model_add_item (t, position, -1, id, (char *)type);
                 }
               g_free (id);
             }
          xmlFree (name);
           xmlFree (type);
        }
-      else if (xmlStrEqual (child->name, "separator"))
+      else if (xmlStrEqual (child->name, (xmlChar *)"separator"))
        {
          egg_toolbars_model_add_separator (t, position, -1);
        }
@@ -425,18 +425,18 @@ parse_toolbars (EggToolbarsModel *t,
 {
   while (child)
     {
-      if (xmlStrEqual (child->name, "toolbar"))
+      if (xmlStrEqual (child->name, (xmlChar *)"toolbar"))
        {
          xmlChar *name;
          xmlChar *style;
          int position;
 
-         name = xmlGetProp (child, "name");
-         position = egg_toolbars_model_add_toolbar (t, -1, name);
+         name = xmlGetProp (child, (xmlChar *)"name");
+         position = egg_toolbars_model_add_toolbar (t, -1, (char *)name);
          xmlFree (name);
 
-         style = xmlGetProp (child, "style");
-         if (style && xmlStrEqual (style, "icons-only"))
+         style = xmlGetProp (child, (xmlChar *)"style");
+         if (style && xmlStrEqual (style, (xmlChar *)"icons-only"))
            {
              /* FIXME: use toolbar position instead of 0 */
              egg_toolbars_model_set_flags (t, 0, EGG_TB_MODEL_ICONS_ONLY);
index fbb059282602e1dc90e2d49d54827132d91eb381..6175e471980f5b1d498a2604c67ac628d1cc74be 100644 (file)
@@ -54,7 +54,7 @@ static void dvi_pixbuf_draw_rule(DviContext *dvi, int x, int y, Uint w, Uint h,
 {
        DviPixbufDevice *c_device = (DviPixbufDevice *) dvi->device.device_data;
        gint rowstride;
-       gchar *p;
+       guchar *p;
        gint i, j;    
        gint red, green, blue;
        
@@ -140,7 +140,7 @@ static void dvi_pixbuf_free_image(void *ptr)
 
 static void dvi_pixbuf_put_pixel(void *image, int x, int y, Ulong color)
 {
-    gchar *p;
+    guchar *p;
     
     p = gdk_pixbuf_get_pixels (GDK_PIXBUF(image)) + y * gdk_pixbuf_get_rowstride(GDK_PIXBUF(image)) + x * 4;