[beast: 13/18] BEAST: fix signedness compiler warnings



commit eddf186881358926f5f981fb4ffbce59fc84e11c
Author: Tim Janik <timj gnu org>
Date:   Thu Sep 24 20:44:06 2015 +0200

    BEAST: fix signedness compiler warnings

 beast-gtk/bstasciipixbuf.cc       |    2 +-
 beast-gtk/bstcluehunter.cc        |    2 +-
 beast-gtk/bstdial.cc              |    2 +-
 beast-gtk/bstrackeditor-covers.cc |    2 +-
 beast-gtk/bstsequence.cc          |    8 ++++----
 beast-gtk/bstsnifferscope.cc      |    2 +-
 beast-gtk/tsmview.cc              |    4 ++--
 7 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/beast-gtk/bstasciipixbuf.cc b/beast-gtk/bstasciipixbuf.cc
index 7dbb487..c245e99 100644
--- a/beast-gtk/bstasciipixbuf.cc
+++ b/beast-gtk/bstasciipixbuf.cc
@@ -60,7 +60,7 @@ bst_ascii_pixbuf_new (gchar character,
     char_width = width;
   if (!char_height)
     char_height = gdk_pixbuf_get_height (pixbuf);
-  if (char_width != width || char_height != gdk_pixbuf_get_height (pixbuf))
+  if (char_width != width || char_height != (uint) gdk_pixbuf_get_height (pixbuf))
     {
       GdkPixbuf *tmp_pixbuf = pixbuf;
 
diff --git a/beast-gtk/bstcluehunter.cc b/beast-gtk/bstcluehunter.cc
index 8d919e9..0b36d67 100644
--- a/beast-gtk/bstcluehunter.cc
+++ b/beast-gtk/bstcluehunter.cc
@@ -960,7 +960,7 @@ bst_clue_hunter_event (GtkWidget *widget,
                                                               &row, NULL);
              if (event->type == GDK_BUTTON_RELEASE &&
                  on_row && self->clist->selection &&
-                 GPOINTER_TO_UINT (self->clist->selection->data) == row)
+                 GPOINTER_TO_UINT (self->clist->selection->data) == uint (row))
                {
                  gchar *string = bst_clue_hunter_try_complete (self);
                  gtk_entry_set_text (GTK_ENTRY (self->entry), string ? string : "");
diff --git a/beast-gtk/bstdial.cc b/beast-gtk/bstdial.cc
index 1d35c3f..78ec85b 100644
--- a/beast-gtk/bstdial.cc
+++ b/beast-gtk/bstdial.cc
@@ -288,7 +288,7 @@ bst_dial_paint (BstDial *dial)
       n_steps = 8;
       thick_step = 2;
     }
-  for (i = 0; i < n_steps + 1; i++)
+  for (i = 0; i < uint (n_steps + 1); i++)
     {
       theta = M_PI - (i * M_PI / ((double) n_steps));
       s = sin (theta);
diff --git a/beast-gtk/bstrackeditor-covers.cc b/beast-gtk/bstrackeditor-covers.cc
index a2fa65e..00bd190 100644
--- a/beast-gtk/bstrackeditor-covers.cc
+++ b/beast-gtk/bstrackeditor-covers.cc
@@ -153,7 +153,7 @@ rack_cover_add_plates (BstRackTable *rtable)
                  l = j;
                  m = t;
                  n = u;
-                 if (max > max_free / 2)
+                 if (max > uint (max_free / 2))
                    goto max_found;
                }
            }
diff --git a/beast-gtk/bstsequence.cc b/beast-gtk/bstsequence.cc
index a40e4a1..7d6f091 100644
--- a/beast-gtk/bstsequence.cc
+++ b/beast-gtk/bstsequence.cc
@@ -155,7 +155,7 @@ darea_expose_event (BstSequence    *seq,
   GdkGC *hl_gc = widget->style->bg_gc[GTK_STATE_SELECTED];
   gint width, height, maxx, maxy;
   gfloat nwidth, row_height;
-  gint i, j;
+  gint j;
 
   gdk_window_get_size (widget->window, &width, &height);
   maxx = width - 1;
@@ -173,7 +173,7 @@ darea_expose_event (BstSequence    *seq,
   /* draw rectangles */
   row_height = maxy / (gfloat) seq->n_rows;
   nwidth = maxx / (gfloat) sdata->notes->n_notes;
-  for (i = 0; i < sdata->notes->n_notes; i++)
+  for (uint i = 0; i < sdata->notes->n_notes; i++)
     for (j = 0; j < seq->n_rows; j++)
       {
        gboolean ncheck = sdata->notes->notes[i] == (seq->n_rows - 1 - j) + sdata->offset;
@@ -215,7 +215,7 @@ darea_button_event (BstSequence    *seq,
          dx = event->x / nwidth;
          dy = event->y / row_height;
          dy = seq->n_rows - 1 - CLAMP (dy, 0, seq->n_rows - 1);
-         if (dx >= 0 && dx < sdata->notes->n_notes &&
+         if (dx >= 0 && dx < int (sdata->notes->n_notes) &&
              sdata->notes->notes[dx] != dy + sdata->offset)
            {
              sdata->notes->notes[dx] = dy + sdata->offset;
@@ -263,7 +263,7 @@ darea_motion_event (BstSequence    *seq,
       dx = event->x / nwidth;
       dy = event->y / row_height;
       dy = seq->n_rows - 1 - CLAMP (dy, 0, seq->n_rows - 1);
-      if (dx >= 0 && dx < sdata->notes->n_notes &&
+      if (dx >= 0 && dx < int (sdata->notes->n_notes) &&
          sdata->notes->notes[dx] != dy + sdata->offset)
        {
          sdata->notes->notes[dx] = dy + sdata->offset;
diff --git a/beast-gtk/bstsnifferscope.cc b/beast-gtk/bstsnifferscope.cc
index ed1ac26..d8bb787 100644
--- a/beast-gtk/bstsnifferscope.cc
+++ b/beast-gtk/bstsnifferscope.cc
@@ -143,7 +143,7 @@ bst_sniffer_scope_expose (GtkWidget      *widget,
   gint i, xl, xr, width;
   sniffer_scope_lregion (self, &xl, &width);
   sniffer_scope_rregion (self, &xr, &width);
-  for (i = 0; i < self->n_values; i++)
+  for (i = 0; i < int (self->n_values); i++)
     {
       sniffer_scope_draw_bar (self, xl + width - 1 - i, self->lvalues[i]);
       sniffer_scope_draw_bar (self, xr + i, self->rvalues[i]);
diff --git a/beast-gtk/tsmview.cc b/beast-gtk/tsmview.cc
index 64e8b25..d38bf83 100644
--- a/beast-gtk/tsmview.cc
+++ b/beast-gtk/tsmview.cc
@@ -32,7 +32,7 @@ main (int   argc,
 
   gxk_text_register_textget_handler ("textget-label", textget_handler, NULL);
 
-  for (i = 1; i < argc; i++)
+  for (i = 1; i < uint (argc); i++)
     if (!flags && strcmp (argv[i], "--edit") == 0)
       {
        flags = GXK_SCROLL_TEXT_EDITABLE;
@@ -54,7 +54,7 @@ main (int   argc,
   gxk_text_add_tsm_path (bse_installpath (BSE_INSTALLPATH_PKGDATADIR_IMAGES).c_str());
   sctext = gxk_scroll_text_create (GXK_SCROLL_TEXT_NAVIGATABLE | flags, NULL);
   gxk_scroll_text_enter (sctext, title);
-  for (i = 1; i < argc; i++)
+  for (i = 1; i < uint (argc); i++)
     if (argv[i])
       {
        gxk_scroll_text_enter (sctext, argv[i]);


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