[gnumeric] Compilation: kill warnings.



commit a994804117b5c0ee968e1c68c02abded2c97fc84
Author: Morten Welinder <terra gnome org>
Date:   Sat Dec 7 13:52:19 2013 -0500

    Compilation: kill warnings.

 plugins/excel/ms-chart.c        |    4 ++--
 plugins/excel/ms-excel-read.c   |    2 +-
 plugins/excel/xls-read-pivot.c  |    7 ++++---
 plugins/excel/xlsx-read-pivot.c |    6 ++++--
 src/gui-clipboard.c             |    2 +-
 src/item-bar.c                  |    2 +-
 src/sheet-object-image.c        |    9 ++++++---
 src/widgets/gnm-fontbutton.c    |    4 ++--
 src/xml-sax-read.c              |    6 ++++--
 9 files changed, 25 insertions(+), 17 deletions(-)
---
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index 7ad04f7..7a8a40e 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -1142,7 +1142,7 @@ BC_R(gelframe) (XLChartHandler const *handle,
                case 0x0200 : brightness = 1. - frac/512.; break;
                }
                go_style_set_fill_brightness (s->style, (1. - brightness) * 100.);
-               d (1, g_printerr ("%x : frac = %u, flag = 0x%hx ::: %f",
+               d (1, g_printerr ("%x : frac = %u, flag = 0x%x ::: %f",
                               fill_back_color, frac, fill_back_color & 0xff00, brightness););
        }
 
@@ -2139,7 +2139,7 @@ BC_R(siindex)(XLChartHandler const *handle,
        /* UNDOCUMENTED : Docs says this is long
         * Biff record is only length 2 */
        s->cur_role = GSF_LE_GET_GUINT16 (q->data);
-       d (1, g_printerr ("Series %d is %hd\n", s->series->len, s->cur_role););
+       d (1, g_printerr ("Series %d is %d\n", s->series->len, s->cur_role););
        return FALSE;
 }
 /****************************************************************************/
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index 3fb8e95..b080649 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -4360,7 +4360,7 @@ excel_read_COLINFO (BiffQuery *q, ExcelReadSheet *esheet)
 
        d (1, {
                        g_printerr ("Column Formatting %s!%s of width "
-                                   "%hu/256 characters (%f pts)\n",
+                                   "%u/256 characters (%f pts)\n",
                                    esheet->sheet->name_quoted,
                                    cols_name (firstcol, lastcol), charwidths, width);
                        g_printerr ("Options 0x%hx, default style %hu\n", options, xf);
diff --git a/plugins/excel/xls-read-pivot.c b/plugins/excel/xls-read-pivot.c
index e1d4ea9..d26e2bc 100644
--- a/plugins/excel/xls-read-pivot.c
+++ b/plugins/excel/xls-read-pivot.c
@@ -330,7 +330,8 @@ of the calculated field is stored in a directly following SXFormula record. If f
        d (4, gsf_mem_dump (q->data + 2, MIN (q->length, 0xc)););
 
        /* SQL type of field (ignored) */
-       if (ms_biff_query_peek_next (q, &opcode) && opcode == BIFF_SXFDBTYPE && check_next (q, 2)) ;
+       if (ms_biff_query_peek_next (q, &opcode) && opcode == BIFF_SXFDBTYPE && check_next (q, 2))
+               /* Nothing */ ;
 
        switch (index_type) {
        case 1 :
@@ -387,8 +388,8 @@ xls_read_pivot_cache (XLSReadPivot *s, BiffQuery *q)
                guint16 base_fields     = GSF_LE_GET_GUINT16 (q->data + 10);    /* base */
                /* guint16 zero */
                guint16 type            = GSF_LE_GET_GUINT16 (q->data + 16);
-               g_printerr ("num_rec = %u;\nstream_id = %hu;\n"
-                        "rec per block = %hu;\nbase fields = %hu;\ntotal fields = %hu;\n"
+               g_printerr ("num_rec = %u;\nstream_id = %u;\n"
+                        "rec per block = %u;\nbase fields = %hu;\ntotal fields = %hu;\n"
                         "last modified by = '%s';type = 0x%x, flags = 0x%x;\n",
                         num_records, stream_id, rec_per_block, base_fields,
                         num_fields, refreshedBy, type, flags);
diff --git a/plugins/excel/xlsx-read-pivot.c b/plugins/excel/xlsx-read-pivot.c
index 1a60476..20072a6 100644
--- a/plugins/excel/xlsx-read-pivot.c
+++ b/plugins/excel/xlsx-read-pivot.c
@@ -213,7 +213,8 @@ xlsx_CT_Field (GsfXMLIn *xin, xmlChar const **attrs)
        int indx = -1;
 
        for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
-               if (attr_int (xin, attrs, "x", &indx)) ;
+               if (attr_int (xin, attrs, "x", &indx))
+                       /* Nothing */ ;
 
        if (indx >= 0)
                go_data_slicer_field_set_field_type_pos (
@@ -249,7 +250,8 @@ xlsx_CT_DataField (GsfXMLIn *xin, xmlChar const **attrs)
        /* Why "fld" in data vs "x" in col/row ? */
        for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
                if (attr_int (xin, attrs, "fld", &indx)) ;
-               else if (attr_enum (xin, attrs, "subtotal", aggregations, &aggregate_by)) ;
+               else if (attr_enum (xin, attrs, "subtotal", aggregations, &aggregate_by))
+                       /* Nothing */ ;
 
        if (indx >= 0) {
                GODataSlicerField *dsf = go_data_slicer_get_field ((GODataSlicer *)state->pivot.slicer, indx);
diff --git a/src/gui-clipboard.c b/src/gui-clipboard.c
index 556877d..50befa5 100644
--- a/src/gui-clipboard.c
+++ b/src/gui-clipboard.c
@@ -422,7 +422,7 @@ parse_ms_headers (const char *data, size_t length, size_t *start, size_t *end)
 
                if (strcmp (key, "StartHTML") == 0) {
                        long l = strtol (value, NULL, 10);
-                       limit = MIN (limit, MAX (0, l));
+                       limit = MIN (limit, (size_t)MAX (0, l));
                }
 
                g_hash_table_replace (headers, key, value);
diff --git a/src/item-bar.c b/src/item-bar.c
index c891c64..dbf4a94 100644
--- a/src/item-bar.c
+++ b/src/item-bar.c
@@ -163,7 +163,7 @@ ib_reload_style (GnmItemBar *ib)
                                          &ib->selection_logical_sizes[ui]);
        }
 
-       gtk_style_context_get_padding (context, GTK_STATE_NORMAL,
+       gtk_style_context_get_padding (context, GTK_STATE_FLAG_NORMAL,
                                       &ib->padding);
 
        gtk_style_context_restore (context);
diff --git a/src/sheet-object-image.c b/src/sheet-object-image.c
index 4531e67..7534983 100644
--- a/src/sheet-object-image.c
+++ b/src/sheet-object-image.c
@@ -418,9 +418,12 @@ gnm_soi_prep_sax_parser (SheetObject *so, GsfXMLIn *xin,
 
        for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) {
                if (gnm_xml_attr_double (attrs, "crop-top", &soi->crop_top)) ;
-               else if (gnm_xml_attr_double (attrs, "crop-bottom", &soi->crop_bottom)) ;
-               else if (gnm_xml_attr_double (attrs, "crop-left", &soi->crop_left)) ;
-               else if (gnm_xml_attr_double (attrs, "crop-right", &soi->crop_right)) ;
+               else if (gnm_xml_attr_double (attrs, "crop-bottom", &soi->crop_bottom))
+                       /* Nothing */ ;
+               else if (gnm_xml_attr_double (attrs, "crop-left", &soi->crop_left))
+                       /* Nothing */ ;
+               else if (gnm_xml_attr_double (attrs, "crop-right", &soi->crop_right))
+                       /* Nothing */ ;
        }
 }
 
diff --git a/src/widgets/gnm-fontbutton.c b/src/widgets/gnm-fontbutton.c
index 669e7a0..f3b212f 100644
--- a/src/widgets/gnm-fontbutton.c
+++ b/src/widgets/gnm-fontbutton.c
@@ -402,8 +402,8 @@ gnm_font_button_font_chooser_notify (GObject    *object,
                                      gpointer    user_data)
 {
   /* We do not forward the notification of the "font" property to the dialog! */
-  if (pspec->name == ("preview-text") ||
-      pspec->name == ("show-preview-entry"))
+    if (strcmp (pspec->name, ("preview-text")) == 0 ||
+       strcmp (pspec->name, ("show-preview-entry")) == 0)
     g_object_notify_by_pspec (user_data, pspec);
 }
 
diff --git a/src/xml-sax-read.c b/src/xml-sax-read.c
index e1ada14..f677f5d 100644
--- a/src/xml-sax-read.c
+++ b/src/xml-sax-read.c
@@ -520,8 +520,10 @@ xml_sax_version (GsfXMLIn *xin, xmlChar const **attrs)
        state->version = GNM_XML_V11;
        for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
                if (gnm_xml_attr_int (attrs, "Epoch", &major)) ;
-               else if (gnm_xml_attr_int (attrs, "Major", &major)) ;
-               else if (gnm_xml_attr_int (attrs, "Minor", &minor)) ;
+               else if (gnm_xml_attr_int (attrs, "Major", &major))
+                       /* Nothing */ ;
+               else if (gnm_xml_attr_int (attrs, "Minor", &minor))
+                       /* Nothing */ ;
 
        version = (epoch * 100 + major) * 100 + minor;
        if (major >= 7) {


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