utils: Avoid using "type" as name for a variable and a macro argument in GST_BOILERPLATE
authorBastien Nocera <hadess@hadess.net>
Sat, 2 Apr 2011 13:51:18 +0000 (14:51 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 2 Apr 2011 14:12:46 +0000 (15:12 +0100)
This caused "re-declaration" problems.
./clutter-gst-video-sink.c: In function ‘clutter_gst_video_sink_init_interfaces’:
./clutter-gst-video-sink.c:231:1: warning: declaration of ‘ClutterGstVideoSink’ shadows a global declaration [-Wshadow]
./clutter-gst-video-sink.h:64:44: warning: shadowed declaration is here [-Wshadow]

https://bugzilla.gnome.org/show_bug.cgi?id=646531

gst/gstutils.h

index dd93658..d1a9fed 100644 (file)
@@ -216,7 +216,7 @@ type_as_function ## _implements_interface_init (GstImplementsInterfaceClass *kla
 }                                                                       \
                                                                         \
 static void                                                             \
-type_as_function ## _init_interfaces (GType type)                       \
+type_as_function ## _init_interfaces (GType type_var)                   \
 {                                                                       \
   static const GInterfaceInfo implements_iface_info = {                 \
     (GInterfaceInitFunc) type_as_function ## _implements_interface_init,\
@@ -229,9 +229,9 @@ type_as_function ## _init_interfaces (GType type)                       \
     NULL,                                                               \
   };                                                                    \
                                                                         \
-  g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE,     \
+  g_type_add_interface_static (type_var, GST_TYPE_IMPLEMENTS_INTERFACE, \
       &implements_iface_info);                                          \
-  g_type_add_interface_static (type, interface_type_as_macro,          \
+  g_type_add_interface_static (type_var, interface_type_as_macro,      \
       &iface_info);                                                    \
 }                                                                       \
                                                                         \