changeset 1717:837983bac90f trunk

[svn] Fixed a lot of warnings that only showed up on *BSD.
author js
date Sat, 16 Sep 2006 16:26:54 -0700
parents 320ce198ab34
children 44c3711dd049
files ChangeLog Plugins/General/scrobbler/fmt.c Plugins/General/scrobbler/xmms_scrobbler.c Plugins/Input/wma/libffwma/mms.c Plugins/Visualization/paranormal/pn/pnbooleanoption.c Plugins/Visualization/paranormal/pn/pnscriptparser.y audacious/getopt.c audacious/util.c audacious/widgets/textbox.c
diffstat 9 files changed, 29 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Sep 16 15:21:56 2006 -0700
+++ b/ChangeLog	Sat Sep 16 16:26:54 2006 -0700
@@ -1,3 +1,12 @@
+2006-09-16 22:21:56 +0000  Tony Vroon <chainsaw@gentoo.org>
+  revision [2369]
+  Our code is clean enough to not need -Wno-strict-aliasing, with the exception of playlist_list.c (so set that flag for widgets dir only).
+
+  Changes:        Modified:
+  +1 -0           trunk/audacious/widgets/Makefile  
+  +1 -1           trunk/configure.ac  
+
+
 2006-09-16 17:08:23 +0000  Jonathan Schleifer <js@h3c.de>
   revision [2367]
   Fixed 3 warnings, 2 unused variables and 1 missing include
--- a/Plugins/General/scrobbler/fmt.c	Sat Sep 16 15:21:56 2006 -0700
+++ b/Plugins/General/scrobbler/fmt.c	Sat Sep 16 16:26:54 2006 -0700
@@ -69,16 +69,16 @@
 
 int fmt_strcasecmp(const char *s1, const char *s2)
 {
-	while (toupper(*s1) == toupper(*s2++))
+	while (toupper((int) *s1) == toupper((int) *s2++))
 		if (!*s1++)
 			return 0;
-	return toupper(s1[0]) - toupper(s2[-1]);
+	return toupper((int) s1[0]) - toupper((int) s2[-1]);
 }
 
 int fmt_strncasecmp(const char *s1, const char *s2, size_t n)
 {
-	while (toupper(*s1) == toupper(*s2++) && --n)
+	while (toupper((int) *s1) == toupper((int) *s2++) && --n)
 		if(!*s1++)
 			return 0;
-	return n ? toupper(s1[0]) - toupper(s2[-1]) : 0;
+	return n ? toupper((int) s1[0]) - toupper((int) s2[-1]) : 0;
 }
--- a/Plugins/General/scrobbler/xmms_scrobbler.c	Sat Sep 16 15:21:56 2006 -0700
+++ b/Plugins/General/scrobbler/xmms_scrobbler.c	Sat Sep 16 16:26:54 2006 -0700
@@ -128,7 +128,7 @@
 
 	tmp = strdup(a);
 	for (bp = tmp; *bp; bp++)
-		*bp = toupper(*bp);
+		*bp = toupper((int) *bp);
 	if (strstr(tmp, "HTTP://"))
 		status = -1;
 	free(tmp);
--- a/Plugins/Input/wma/libffwma/mms.c	Sat Sep 16 15:21:56 2006 -0700
+++ b/Plugins/Input/wma/libffwma/mms.c	Sat Sep 16 16:26:54 2006 -0700
@@ -476,7 +476,9 @@
     }
 }
 
-static void string_utf16(iconv_t url_conv, char *dest, char *src, int len) {
+static void
+string_utf16(iconv_t url_conv, char *dest, const char *src, int len)
+{
     memset(dest, 0, 2 * len);
 
     if (url_conv == (iconv_t)-1) {
@@ -490,8 +492,9 @@
       dest[i * 2 + 1] = 0;
     }
     else {
+      const char *ip;
+      char *op;
       size_t len1, len2;
-      char *ip, *op;
 
       len1 = len; len2 = 1000;
       ip = src; op = dest;
--- a/Plugins/Visualization/paranormal/pn/pnbooleanoption.c	Sat Sep 16 15:21:56 2006 -0700
+++ b/Plugins/Visualization/paranormal/pn/pnbooleanoption.c	Sat Sep 16 16:26:54 2006 -0700
@@ -137,7 +137,7 @@
   if (! val_str)
     goto done;
 
-  while (isspace (*val_str))
+  while (isspace ((int) *val_str))
     val_str++;
 
   if (g_strncasecmp (val_str, "True", 4) == 0)
--- a/Plugins/Visualization/paranormal/pn/pnscriptparser.y	Sat Sep 16 15:21:56 2006 -0700
+++ b/Plugins/Visualization/paranormal/pn/pnscriptparser.y	Sat Sep 16 16:26:54 2006 -0700
@@ -432,14 +432,14 @@
 yylex (void)
 {
   /* Skip whitespaces */
-  while (isspace (*parse_string)) parse_string++;
+  while (isspace ((int) *parse_string)) parse_string++;
 
   /* Handle the end of the string */
   if (*parse_string == '\0')
     return 0;
 
   /* Handle unnamed (numeric) constants */
-  if (*parse_string == '.' || isdigit (*parse_string))
+  if (*parse_string == '.' || isdigit ((int) *parse_string))
     {
       gdouble value;
 
@@ -450,13 +450,14 @@
     }
 
   /* Handle alphanumeric symbols */
-  if (isalpha (*parse_string))
+  if (isalpha ((int) *parse_string))
     {
       const gchar *symbol_start = parse_string;
       guint function_token;
       gchar *symbol_name;
 
-      while (isalnum (*parse_string) || *parse_string == '_') parse_string++;
+      while (isalnum ((int) *parse_string) || *parse_string == '_')
+        parse_string++;
 
       symbol_name = g_strndup (symbol_start, parse_string - symbol_start);
 
--- a/audacious/getopt.c	Sat Sep 16 15:21:56 2006 -0700
+++ b/audacious/getopt.c	Sat Sep 16 16:26:54 2006 -0700
@@ -630,7 +630,7 @@
                 if (pfound->has_arg)
                     optarg = nameend + 1;
                 else {
-                    if (opterr)
+                    if (opterr) {
                         if (argv[optind - 1][1] == '-')
                             /* --option */
                             fprintf(stderr,
@@ -644,6 +644,7 @@
                                     ("%s: option `%c%s' doesn't allow an argument\n"),
                                     argv[0], argv[optind - 1][0],
                                     pfound->name);
+		    }
 
                     nextchar += strlen(nextchar);
 
--- a/audacious/util.c	Sat Sep 16 15:21:56 2006 -0700
+++ b/audacious/util.c	Sat Sep 16 16:26:54 2006 -0700
@@ -532,7 +532,7 @@
             break;
         g_array_append_val(array, temp);
         ptr = endptr;
-        while (!isdigit(*ptr) && (*ptr) != '\0')
+        while (!isdigit((int) *ptr) && (*ptr) != '\0')
             ptr++;
         if (*ptr == '\0')
             break;
--- a/audacious/widgets/textbox.c	Sat Sep 16 15:21:56 2006 -0700
+++ b/audacious/widgets/textbox.c	Sat Sep 16 16:26:54 2006 -0700
@@ -449,7 +449,7 @@
     for (i = 0; i < length; i++) {
         gchar c;
         x = y = -1;
-        c = toupper(pixmaptext[i]);
+        c = toupper((int) pixmaptext[i]);
         if (c >= 'A' && c <= 'Z') {
             x = 5 * (c - 'A');
             y = 0;