commit e3ca76f8c61f301673c8dfb9e02a98cd3c51dbaf
Author: Daniele Forsi <[email protected]>
Date: Sun Mar 25 17:26:10 2012 +0200
Add const keywords (warnings by clang)
At some time they were added to gtk too.
Eg. see http://developer.gnome.org/gtk/2.24/GtkCellRenderer.html
Fixes:
CC rb_cell_renderer_rating.lo
rb_cell_renderer_rating.c:159:23: warning: incompatible pointer types
assigning to 'void (*)(GtkCellRenderer *, GtkWidget *, const GdkRectangle *,
gint *, gint *, gint *, gint *)' from 'void (GtkCellRenderer *, GtkWidget *,
GdkRectangle *, gint *, gint *, gint *, gint *)'
cell_class->get_size = rb_cell_renderer_rating_get_size;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rb_cell_renderer_rating.c:161:23: warning: incompatible pointer types
assigning to 'gboolean (*)(GtkCellRenderer *, GdkEvent *, GtkWidget *, const
gchar *, const GdkRectangle *, const GdkRectangle *, GtkCellRendererState)'
from 'gboolean (GtkCellRenderer *, GdkEvent *, GtkWidget *, const gchar *,
GdkRectangle *, GdkRectangle *, GtkCellRendererState)'
cell_class->activate = rb_cell_renderer_rating_activate;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rb_cell_renderer_rating.c:287:50: warning: passing 'const GdkRectangle *'
(aka 'const struct _cairo_rectangle_int *') to parameter of type 'GdkRectangle
*' (aka 'struct _cairo_rectangle_int *') discards qualifiers
rb_cell_renderer_rating_get_size (cell, widget, cell_area,
^~~~~~~~~
rb_cell_renderer_rating.c:244:21: note: passing argument to parameter
'cell_area' here
GdkRectangle *cell_area,
^
3 warnings generated.
plugins/track_display/rb_cell_renderer_rating.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/plugins/track_display/rb_cell_renderer_rating.c
b/plugins/track_display/rb_cell_renderer_rating.c
index 7d9bd2a..322c2d0 100644
--- a/plugins/track_display/rb_cell_renderer_rating.c
+++ b/plugins/track_display/rb_cell_renderer_rating.c
@@ -47,7 +47,7 @@ static void rb_cell_renderer_rating_init
(RBCellRendererRating *celltext);
static void rb_cell_renderer_rating_class_init (RBCellRendererRatingClass
*class);
static void rb_cell_renderer_rating_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
- GdkRectangle *rectangle,
+ const GdkRectangle *rectangle,
gint *x_offset,
gint *y_offset,
gint *width,
@@ -62,8 +62,8 @@ static gboolean rb_cell_renderer_rating_activate
(GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ const GdkRectangle
*background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags);
static void rb_cell_renderer_rating_finalize (GObject *object);
@@ -241,7 +241,7 @@ rb_cell_renderer_rating_new ()
static void
rb_cell_renderer_rating_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
- GdkRectangle *cell_area,
+ const GdkRectangle *cell_area,
gint *x_offset,
gint *y_offset,
gint *width,
@@ -314,8 +314,8 @@ rb_cell_renderer_rating_activate (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags)
{
int mouse_x, mouse_y;
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2