[x264-devel] commit: Fix define of illegal identifier (as defined in section "7.1. 3 Reserved identiers" of C99 spec) "__UNUSED__", and use the one defined in common/osdep.h, i.e. "UNUSED" ( Guillaume Poirier )

git version control git at videolan.org
Fri Apr 25 17:01:35 CEST 2008


x264 | branch: master | Guillaume Poirier <gpoirier at mplayerhq.hu> | Fri Apr 25 10:50:48 2008 +0200| [ef36548b728491cb5d81c24e7f48c9f216845a3d]

Fix define of illegal identifier (as defined in section "7.1.3 Reserved identiers" of C99 spec) "__UNUSED__", and use the one defined in common/osdep.h, i.e. "UNUSED"
based on a patch by Diego Biurrun

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=ef36548b728491cb5d81c24e7f48c9f216845a3d
---

 gtk/x264_gtk.c                      |    4 ++--
 gtk/x264_gtk_encode_main_window.c   |   10 +++++-----
 gtk/x264_gtk_encode_private.h       |    2 +-
 gtk/x264_gtk_encode_status_window.c |    2 +-
 gtk/x264_gtk_private.h              |    2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gtk/x264_gtk.c b/gtk/x264_gtk.c
index bf4d7c6..8f95c24 100644
--- a/gtk/x264_gtk.c
+++ b/gtk/x264_gtk.c
@@ -330,7 +330,7 @@ x264_gtk_free (X264_Gtk *x264_gtk)
 /* Callbacks */
 
 static void
-_dialog_run (GtkDialog       *dialog __UNUSED__,
+_dialog_run (GtkDialog       *dialog UNUSED,
              gint             response,
              X264_Gui_Config *gconfig,
              X264_Gtk        *x264_gtk)
@@ -382,7 +382,7 @@ _dialog_run (GtkDialog       *dialog __UNUSED__,
 
 /* x264 config management */
 static void
-_default_load (GtkButton *button __UNUSED__, gpointer user_data)
+_default_load (GtkButton *button UNUSED, gpointer user_data)
 {
   gchar            buf[64];
   X264_Gui_Config *config;
diff --git a/gtk/x264_gtk_encode_main_window.c b/gtk/x264_gtk_encode_main_window.c
index dbf9efd..d6141ba 100644
--- a/gtk/x264_gtk_encode_main_window.c
+++ b/gtk/x264_gtk_encode_main_window.c
@@ -328,8 +328,8 @@ _encode_shutdown (X264_Gtk_Encode *encode)
 }
 
 static gboolean
-_delete_window_cb (GtkWidget *widget __UNUSED__,
-                   GdkEvent  *event __UNUSED__,
+_delete_window_cb (GtkWidget *widget UNUSED,
+                   GdkEvent  *event UNUSED,
                    gpointer   user_data)
 {
   gtk_main_quit ();
@@ -504,7 +504,7 @@ _dimension_entry_cb (GtkEditable *editable,
 }
 
 static void
-_configure_window_cb (GtkButton *button __UNUSED__,
+_configure_window_cb (GtkButton *button UNUSED,
                       gpointer   user_data)
 {
   GtkWidget *window;
@@ -693,8 +693,8 @@ _response_window_cb (GtkDialog *dialog,
 }
 
 static gboolean
-_fill_status_window (GIOChannel  *io __UNUSED__,
-                     GIOCondition condition __UNUSED__,
+_fill_status_window (GIOChannel  *io UNUSED,
+                     GIOCondition condition UNUSED,
                      gpointer     user_data)
 {
   gchar             str[128];
diff --git a/gtk/x264_gtk_encode_private.h b/gtk/x264_gtk_encode_private.h
index cebfc4a..47fc9f8 100644
--- a/gtk/x264_gtk_encode_private.h
+++ b/gtk/x264_gtk_encode_private.h
@@ -2,7 +2,7 @@
 #define X264_GTK_ENCODE_PRIVATE_H
 
 
-#define __UNUSED__ __attribute__((unused))
+#include <common/osdep.h>
 
 #include "x264_gtk_demuxers.h"
 
diff --git a/gtk/x264_gtk_encode_status_window.c b/gtk/x264_gtk_encode_status_window.c
index a8f7f6e..d7c7bbf 100644
--- a/gtk/x264_gtk_encode_status_window.c
+++ b/gtk/x264_gtk_encode_status_window.c
@@ -149,7 +149,7 @@ _thread_data_free (X264_Thread_Data *thread_data)
 
 static gboolean
 _delete_window_cb (GtkWidget *widget,
-                   GdkEvent  *event __UNUSED__,
+                   GdkEvent  *event UNUSED,
                    gpointer   user_data)
 {
   gtk_widget_destroy (widget);
diff --git a/gtk/x264_gtk_private.h b/gtk/x264_gtk_private.h
index 8b8f475..aa9d40e 100644
--- a/gtk/x264_gtk_private.h
+++ b/gtk/x264_gtk_private.h
@@ -2,7 +2,7 @@
 #define X264_GTK_PRIVATE_H
 
 
-#define __UNUSED__ __attribute__((unused))
+#include <common/osdep.h>
 
 
 typedef struct Bitrate_ Bitrate;



More information about the x264-devel mailing list