changeset 1044:b1128efde471 trunk

[svn] - get rid of all warnings gcc 4.2.0 emits with my build configuration. - fix for minor bugs.
author yaz
date Sun, 20 May 2007 12:05:48 -0700
parents f65aa5417221
children 028b7ca16d30
files ChangeLog src/aac/libfaad2/common.h src/adplug/adplug-xmms.cc src/adplug/core/mid.cxx src/adplug/core/mid.h src/console/Audacious_Driver.cxx src/filewriter/flac.c src/filewriter/mp3.c src/flacng/Makefile src/flacng/plugin.c src/flacng/tools.c src/lastfm/Makefile src/lastfm/lastfm.c src/lastfm/lastfm.h src/modplug/fastmix.cxx src/modplug/gui/support.cxx src/modplug/plugin.cxx src/musepack/libmpc.cxx src/musepack/libmpc.h src/rootvis/config_frontend_widgets.c src/scrobbler/scrobbler.c src/wavpack/libwavpack.cxx src/wavpack/tags.cxx src/wavpack/ui.cxx src/wma/Makefile
diffstat 25 files changed, 62 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 18 10:42:29 2007 -0700
+++ b/ChangeLog	Sun May 20 12:05:48 2007 -0700
@@ -1,3 +1,12 @@
+2007-05-18 17:42:29 +0000  Kiyoshi Aman <kiyoshi.aman@gmail.com>
+  revision [2252]
+  I will murder someone if I have to fix the buildsystem again.
+  trunk/configure.ac            |   39 ++++++++++++++++++++++++++-------------
+  trunk/mk/rules.mk.in          |    2 +-
+  trunk/src/filewriter/Makefile |    2 +-
+  3 files changed, 28 insertions(+), 15 deletions(-)
+
+
 2007-05-18 10:41:05 +0000  Tony Vroon <chainsaw@gentoo.org>
   revision [2250]
   Use proper integer types in the code, patch by Pavel Vymetalek <pvymetalek@seznam.cz>.
--- a/src/aac/libfaad2/common.h	Fri May 18 10:42:29 2007 -0700
+++ b/src/aac/libfaad2/common.h	Sun May 20 12:05:48 2007 -0700
@@ -362,8 +362,6 @@
 
   #else
 
-#include <math.h>
-
 #ifdef HAVE_LRINTF
 #  define HAS_LRINTF
 #  define _ISOC9X_SOURCE 1
@@ -372,6 +370,8 @@
 #  define __USE_ISOC99   1
 #endif
 
+#include <math.h>
+
 #ifdef HAVE_SINF
 #  define sin sinf
 #error
--- a/src/adplug/adplug-xmms.cc	Fri May 18 10:42:29 2007 -0700
+++ b/src/adplug/adplug-xmms.cc	Sun May 20 12:05:48 2007 -0700
@@ -407,11 +407,11 @@
                                             "Format selection"), 0, 1, 0, 1);
     // Add scrollable list
     {
-      gchar *rowstr[] = { "Format", "Extension" };
+      const gchar *rowstr[] = { "Format", "Extension" };
       GtkEventBox *eventbox = GTK_EVENT_BOX (gtk_event_box_new ());
       GtkScrolledWindow *formatswnd =
         GTK_SCROLLED_WINDOW (gtk_scrolled_window_new (NULL, NULL));
-      GtkCList *fl = GTK_CLIST (gtk_clist_new_with_titles (2, rowstr));
+      GtkCList *fl = GTK_CLIST (gtk_clist_new_with_titles (2, (gchar **)rowstr));
       CPlayers::const_iterator i;
       unsigned int j;
       gtk_clist_set_selection_mode (fl, GTK_SELECTION_MULTIPLE);
@@ -599,8 +599,8 @@
     gchar tmpstr[10];
 
     {
-      gchar *rowstr[] = { "#", "Instrument name" };
-      instnames = GTK_CLIST (gtk_clist_new_with_titles (2, rowstr));
+      const gchar *rowstr[] = { "#", "Instrument name" };
+      instnames = GTK_CLIST (gtk_clist_new_with_titles (2, (gchar **)rowstr));
     }
     gtk_clist_set_column_justification (instnames, 0, GTK_JUSTIFY_RIGHT);
 
@@ -1039,7 +1039,7 @@
   // Read file type exclusion list
   dbg_printf ("exclusion, ");
   {
-    gchar *cfgstr = "", *exclude;
+    gchar *cfgstr = NULL, *exclude;
     gboolean cfgread;
 
     cfgread = bmp_cfg_db_get_string (db, CFG_VERSION, "Exclude", &cfgstr);
@@ -1122,7 +1122,7 @@
 InputPlugin adplug_ip = {
   NULL,                         // handle (filled by XMMS)
   NULL,                         // filename (filled by XMMS)
-  ADPLUG_NAME,                  // plugin description
+  (gchar *)ADPLUG_NAME,                  // plugin description
   adplug_init,                  // plugin functions...
   adplug_about,
   adplug_config,
--- a/src/adplug/core/mid.cxx	Fri May 18 10:42:29 2007 -0700
+++ b/src/adplug/core/mid.cxx	Sun May 20 12:05:48 2007 -0700
@@ -83,7 +83,7 @@
 #define midiprintf printf
 #else
 void
-CmidPlayer::midiprintf (char *format, ...)
+CmidPlayer::midiprintf (const char *format, ...)
 {
 }
 #endif
--- a/src/adplug/core/mid.h	Fri May 18 10:42:29 2007 -0700
+++ b/src/adplug/core/mid.h	Sun May 20 12:05:48 2007 -0700
@@ -96,7 +96,7 @@
 
  private:
   bool load_sierra_ins(const std::string &fname, const CFileProvider &fp);
-  void midiprintf(char *format, ...);
+  void midiprintf(const char *format, ...);
   unsigned char datalook(long pos);
   unsigned long getnexti(unsigned long num);
   unsigned long getnext(unsigned long num);
--- a/src/console/Audacious_Driver.cxx	Fri May 18 10:42:29 2007 -0700
+++ b/src/console/Audacious_Driver.cxx	Sun May 20 12:05:48 2007 -0700
@@ -477,7 +477,7 @@
 	}
 }
 
-gchar *gme_fmts[] = { "ay", "gbs", "gym", "hes", "kss", "nsf", "nsfe", 
+const gchar *gme_fmts[] = { "ay", "gbs", "gym", "hes", "kss", "nsf", "nsfe", 
 		      "sap", "spc", "vgm", "vgz", NULL };
 
 InputPlugin console_ip =
@@ -510,7 +510,7 @@
 	NULL,
 	NULL,
 	is_our_file_from_vfs,
-	gme_fmts
+	(gchar **)gme_fmts
 };
 
 extern "C" InputPlugin *get_iplugin_info(void)
--- a/src/filewriter/flac.c	Fri May 18 10:42:29 2007 -0700
+++ b/src/filewriter/flac.c	Sun May 20 12:05:48 2007 -0700
@@ -149,7 +149,7 @@
         }
     }
 
-    FLAC__stream_encoder_process(flac_encoder, encbuffer, length / (input.channels * 2));
+    FLAC__stream_encoder_process(flac_encoder, (const FLAC__int32 **)encbuffer, length / (input.channels * 2));
     olen += length;
 
     g_free(encbuffer[0]);
--- a/src/filewriter/mp3.c	Fri May 18 10:42:29 2007 -0700
+++ b/src/filewriter/mp3.c	Sun May 20 12:05:48 2007 -0700
@@ -459,12 +459,12 @@
 static void vbr_abr_toggle(GtkToggleButton * togglebutton,
                            gpointer user_data)
 {
-    if (user_data == "VBR") {
+    if (!strcmp(user_data, "VBR")) {
         gtk_widget_set_sensitive(abr_frame, FALSE);
         gtk_widget_set_sensitive(vbr_frame, TRUE);
         vbr_type = 0;
     }
-    else if (user_data == "ABR") {
+    else if (!strcmp(user_data, "ABR")) {
         gtk_widget_set_sensitive(abr_frame, TRUE);
         gtk_widget_set_sensitive(vbr_frame, FALSE);
         vbr_type = 1;
@@ -571,7 +571,7 @@
 static void id3_only_version(GtkToggleButton * togglebutton,
                              gpointer user_data)
 {
-    if (user_data == "v1" && inside != 1) {
+    if (!strcmp(user_data, "v1") && inside != 1) {
         if (gtk_toggle_button_get_active
             (GTK_TOGGLE_BUTTON(tags_only_v1_toggle)) == TRUE);
         {
@@ -585,7 +585,7 @@
             inside = 0;
         }
     }
-    else if (user_data == "v2" && inside != 1) {
+    else if (!strcmp(user_data, "v2") && inside != 1) {
         if (gtk_toggle_button_get_active
             (GTK_TOGGLE_BUTTON(tags_only_v2_toggle)) == TRUE);
         {
--- a/src/flacng/Makefile	Fri May 18 10:42:29 2007 -0700
+++ b/src/flacng/Makefile	Sun May 20 12:05:48 2007 -0700
@@ -11,6 +11,6 @@
 
 OBJECTS = ${SOURCES:.c=.o}
 
-CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) -I../../intl -I../.. $(FLAC_CFLAGS)
+CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) -I../../intl -I../.. $(FLAC_CFLAGS) -Wall
 
 include ../../mk/objective.mk
--- a/src/flacng/plugin.c	Fri May 18 10:42:29 2007 -0700
+++ b/src/flacng/plugin.c	Sun May 20 12:05:48 2007 -0700
@@ -341,7 +341,6 @@
      * Must be entered with flac_pl_mutex held!
      */
 
-    gint ofree;
     gint32* read_pointer;
     gint elements_left;
     gint seek_sample;
@@ -673,7 +672,6 @@
 
 TitleInput *flac_get_song_tuple(gchar* filename) {
 
-    gint l;
     TitleInput *tuple;
 
     _ENTER;
--- a/src/flacng/tools.c	Fri May 18 10:42:29 2007 -0700
+++ b/src/flacng/tools.c	Sun May 20 12:05:48 2007 -0700
@@ -245,6 +245,9 @@
             _LEAVE "FLAC__STREAM_DECODER_UNINITIALIZED";
             break;
 
+        default:
+            break;
+
     }
 
     _LEAVE "";
--- a/src/lastfm/Makefile	Fri May 18 10:42:29 2007 -0700
+++ b/src/lastfm/Makefile	Sun May 20 12:05:48 2007 -0700
@@ -13,7 +13,7 @@
 
 CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(BEEP_DEFINES) $(CURL_CFLAGS) -I../../intl -I../..
 
-CFLAGS += -Wall  -pedantic -std=c99
+CFLAGS += -Wall  -pedantic -std=c99 -fgnu89-inline
 #CFLAGS += -Wpointer-arith -Wimplicit -Wnested-externs -Wcast-align \
 #-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes \
 #-Wmissing-declarations -W -Wno-unused -Wshadow -Wmissing-noreturn \
--- a/src/lastfm/lastfm.c	Fri May 18 10:42:29 2007 -0700
+++ b/src/lastfm/lastfm.c	Sun May 20 12:05:48 2007 -0700
@@ -203,7 +203,7 @@
 }
 
 
-static void *lastfm_get_metadata(LastFM * handle)
+static gpointer lastfm_get_metadata(gpointer arg)
 {
         int err=0,delay=-2;
 
@@ -212,7 +212,8 @@
         gchar tmp[4096];
         GString *res = g_string_new(NULL);
         gboolean track_end=FALSE;
-        
+        LastFM *handle = (LastFM *)arg;
+
         if (handle->lastfm_session_id == NULL)
                 return NULL;
         snprintf(tmp, sizeof(tmp), LASTFM_METADATA_URL, handle->lastfm_session_id);
--- a/src/lastfm/lastfm.h	Fri May 18 10:42:29 2007 -0700
+++ b/src/lastfm/lastfm.h	Sun May 20 12:05:48 2007 -0700
@@ -49,7 +49,7 @@
 
 static void parse_metadata(LastFM * handle,GString * res);
 
-static gpointer lastfm_get_metadata(LastFM * handle);
+static gpointer lastfm_get_metadata(gpointer arg);
 
 static gboolean lastfm_login(void);
 
--- a/src/modplug/fastmix.cxx	Fri May 18 10:42:29 2007 -0700
+++ b/src/modplug/fastmix.cxx	Sun May 20 12:05:48 2007 -0700
@@ -1874,8 +1874,11 @@
 		else if (n > vumax)
 			vumax = n;
 		p = n >> (8-MIXING_ATTENUATION) ; // 24-bit signed
-		buf[i*3]   = p & 0xFF0000 ;
-		buf[i*3+1] = p & 0x00FF00 ;
+//		buf[i*3]   = p & 0xFF0000 ; //XXX
+//		buf[i*3+1] = p & 0x00FF00 ;
+//		buf[i*3+2] = p & 0x0000FF ;
+		buf[i*3]   = (p & 0xFF0000) >> 16 ;
+		buf[i*3+1] = (p & 0x00FF00) >> 8 ;
 		buf[i*3+2] = p & 0x0000FF ;
 	}
 	*lpMin = vumin;
--- a/src/modplug/gui/support.cxx	Fri May 18 10:42:29 2007 -0700
+++ b/src/modplug/gui/support.cxx	Sun May 20 12:05:48 2007 -0700
@@ -47,7 +47,7 @@
 }
 
 /* This is a dummy pixmap we use when a pixmap can't be found. */
-static char *dummy_pixmap_xpm[] = {
+static const char *dummy_pixmap_xpm[] = {
 /* columns rows colors chars-per-pixel */
 "1 1 1 1",
 "  c None",
@@ -66,7 +66,7 @@
 
   colormap = gtk_widget_get_colormap (widget);
   gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask,
-                                                     NULL, dummy_pixmap_xpm);
+                                                     NULL, (gchar **)dummy_pixmap_xpm);
   if (gdkpixmap == NULL)
     g_error ("Couldn't create replacement pixmap.");
   pixmap = gtk_pixmap_new (gdkpixmap, mask);
--- a/src/modplug/plugin.cxx	Fri May 18 10:42:29 2007 -0700
+++ b/src/modplug/plugin.cxx	Sun May 20 12:05:48 2007 -0700
@@ -75,7 +75,7 @@
 	ShowInfoWindow(aFilename);
 }
 
-gchar *fmts[] =
+const gchar *fmts[] =
 	{ "amf", "ams", "dbm", "dbf", "dsm", "far", "mdl", "stm", "ult", "j2b", "mt2",
 	  "mdz", "mdr", "mdgz", "mdbz", "mod", "s3z", "s3r", "s3gz", "s3m", "xmz", "xmr", "xmgz",
 	  "itz", "itr", "itgz", "dmf", "umx", "it", "669", "xm", "mtm", "psm", "ft2", NULL };
@@ -84,7 +84,7 @@
 {
 	NULL,
 	NULL,
-	"ModPlug Player",
+	(gchar *)"ModPlug Player",
 	Init,
 	ShowAboutBox,
 	ShowConfigureBox,
@@ -110,7 +110,7 @@
 	NULL,
 	NULL,
 	CanPlayFileFromVFS,	// vfs
-	fmts,
+	(gchar **)fmts,
 };
 
 extern "C"
--- a/src/musepack/libmpc.cxx	Fri May 18 10:42:29 2007 -0700
+++ b/src/musepack/libmpc.cxx	Sun May 20 12:05:48 2007 -0700
@@ -8,7 +8,7 @@
 using TagLib::String;
 using TagLib::APE::ItemListMap;
 
-gchar *mpc_fmts[] = { "mpc", NULL };
+const gchar *mpc_fmts[] = { "mpc", NULL };
 
 InputPlugin MpcPlugin = {
     NULL,           //File Handle               FILE* handle
@@ -39,7 +39,7 @@
     NULL,
     NULL,
     mpcIsOurFD,
-    mpc_fmts
+    (gchar **)mpc_fmts
 };
 
 extern "C"
@@ -146,8 +146,8 @@
     else
     {
         char* titleText      = g_strdup_printf("Musepack Decoder Plugin 1.2");
-        char* contentText = "Plugin code by\nBenoit Amiaux\nMartin Spuler\nKuniklo\n\nGet latest version at http://musepack.net\n";
-        char* buttonText  = "Nevermind";
+        const char* contentText = "Plugin code by\nBenoit Amiaux\nMartin Spuler\nKuniklo\n\nGet latest version at http://musepack.net\n";
+        const char* buttonText  = "Nevermind";
         aboutBox = xmms_show_message(titleText, contentText, buttonText, FALSE, NULL, NULL);
         widgets.aboutBox = aboutBox;
         g_signal_connect(G_OBJECT(aboutBox), "destroy", G_CALLBACK(gtk_widget_destroyed), &widgets.aboutBox);
@@ -634,7 +634,7 @@
     }
 }
 
-static void mpcGtkPrintLabel(GtkWidget* widget, char* format,...)
+static void mpcGtkPrintLabel(GtkWidget* widget, const char* format,...)
 {
     va_list args;
 
@@ -646,7 +646,7 @@
     free(temp);
 }
 
-static GtkWidget* mpcGtkTagLabel(char* p_Text, int a, int b, int c, int d, GtkWidget* p_Box)
+static GtkWidget* mpcGtkTagLabel(const char* p_Text, int a, int b, int c, int d, GtkWidget* p_Box)
 {
     GtkWidget* label = gtk_label_new(p_Text);
     gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
@@ -676,7 +676,7 @@
     return label;
 }
 
-static GtkWidget* mpcGtkButton(char* p_Text, GtkWidget* p_Box)
+static GtkWidget* mpcGtkButton(const char* p_Text, GtkWidget* p_Box)
 {
     GtkWidget* button = gtk_button_new_with_label(p_Text);
     GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
--- a/src/musepack/libmpc.h	Fri May 18 10:42:29 2007 -0700
+++ b/src/musepack/libmpc.h	Sun May 20 12:05:48 2007 -0700
@@ -114,11 +114,11 @@
 static void       freeTags(MpcInfo&);
 static MpcInfo    getTags(const char*);
 static void       mpcFileInfoBox(char*);
-static void       mpcGtkPrintLabel(GtkWidget*, char*, ...);
-static GtkWidget* mpcGtkTagLabel(char*, int, int, int, int, GtkWidget*);
+static void       mpcGtkPrintLabel(GtkWidget*, const char*, ...);
+static GtkWidget* mpcGtkTagLabel(const char*, int, int, int, int, GtkWidget*);
 static GtkWidget* mpcGtkTagEntry(int, int, int, int, int, GtkWidget*);
 static GtkWidget* mpcGtkLabel(GtkWidget*);
-static GtkWidget* mpcGtkButton(char*, GtkWidget*);
+static GtkWidget* mpcGtkButton(const char*, GtkWidget*);
 static void       removeTags(GtkWidget*, gpointer);
 static void       saveTags(GtkWidget*, gpointer);
 static void       closeInfoBox(GtkWidget*, gpointer);
--- a/src/rootvis/config_frontend_widgets.c	Fri May 18 10:42:29 2007 -0700
+++ b/src/rootvis/config_frontend_widgets.c	Sun May 20 12:05:48 2007 -0700
@@ -365,7 +365,7 @@
 
 	print_status("debug 2");
 
-	window = frontend_create_window(GTK_WINDOW_TOPLEVEL, &name);
+	window = frontend_create_window(GTK_WINDOW_TOPLEVEL, name);
 
 	print_status("done.");
 
--- a/src/scrobbler/scrobbler.c	Fri May 18 10:42:29 2007 -0700
+++ b/src/scrobbler/scrobbler.c	Sun May 20 12:05:48 2007 -0700
@@ -398,7 +398,7 @@
 	char *auth;
 
 	auth_tmp = g_strdup_printf("%s%ld", sc_password, ts);
-	auth = md5_string(auth_tmp, strlen(auth_tmp));
+	auth = (char *)md5_string(auth_tmp, strlen(auth_tmp));
 	g_free(auth_tmp);
 	hexify(auth, strlen(auth));
 	auth_tmp = g_strdup(sc_response_hash);
--- a/src/wavpack/libwavpack.cxx	Fri May 18 10:42:29 2007 -0700
+++ b/src/wavpack/libwavpack.cxx	Sun May 20 12:05:48 2007 -0700
@@ -57,7 +57,7 @@
 extern gboolean albumReplaygainEnabled;
 extern gboolean openedAudio;
 
-gchar *wv_fmts[] = { "wv", NULL };
+const gchar *wv_fmts[] = { "wv", NULL };
 
 InputPlugin mod = {
     NULL,                       //handle
@@ -88,7 +88,7 @@
     NULL,
     NULL,
     wv_is_our_fd,
-    wv_fmts,
+    (gchar **)wv_fmts,
 };
 
 int32_t read_bytes (void *id, void *data, int32_t bcount)
--- a/src/wavpack/tags.cxx	Fri May 18 10:42:29 2007 -0700
+++ b/src/wavpack/tags.cxx	Sun May 20 12:05:48 2007 -0700
@@ -353,7 +353,7 @@
 
 // Returns bytes used in APE-Tag for this value
 int
-addValue(TagItem * item, char *key, char *value)
+addValue(TagItem * item, const char *key, char *value)
 {
     item->keylen = strlen(key);
     item->valuelen = strlen(value);
--- a/src/wavpack/ui.cxx	Fri May 18 10:42:29 2007 -0700
+++ b/src/wavpack/ui.cxx	Sun May 20 12:05:48 2007 -0700
@@ -59,7 +59,7 @@
 }
 
 static void
-label_set_text(GtkWidget * label, char *str, ...)
+label_set_text(GtkWidget * label, const char *str, ...)
 {
     va_list args;
     gchar *tempstr;
--- a/src/wma/Makefile	Fri May 18 10:42:29 2007 -0700
+++ b/src/wma/Makefile	Sun May 20 12:05:48 2007 -0700
@@ -15,6 +15,6 @@
 
 LIBDEP = ./libffwma/libffwma.a
 
-CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) -I../.. -I./libffwma -std=c99
+CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) -I../.. -I./libffwma -std=c99 -fgnu89-inline
 
 include ../../mk/objective.mk