# HG changeset patch # User js # Date 1158449214 25200 # Node ID 837983bac90f21daae1aa6ad3a23b349be352c6a # Parent 320ce198ab34dc297d5fe4167c4ca07b21c7a542 [svn] Fixed a lot of warnings that only showed up on *BSD. diff -r 320ce198ab34 -r 837983bac90f ChangeLog --- 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 + 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 revision [2367] Fixed 3 warnings, 2 unused variables and 1 missing include diff -r 320ce198ab34 -r 837983bac90f Plugins/General/scrobbler/fmt.c --- 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; } diff -r 320ce198ab34 -r 837983bac90f Plugins/General/scrobbler/xmms_scrobbler.c --- 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); diff -r 320ce198ab34 -r 837983bac90f Plugins/Input/wma/libffwma/mms.c --- 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; diff -r 320ce198ab34 -r 837983bac90f Plugins/Visualization/paranormal/pn/pnbooleanoption.c --- 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) diff -r 320ce198ab34 -r 837983bac90f Plugins/Visualization/paranormal/pn/pnscriptparser.y --- 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); diff -r 320ce198ab34 -r 837983bac90f audacious/getopt.c --- 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); diff -r 320ce198ab34 -r 837983bac90f audacious/util.c --- 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; diff -r 320ce198ab34 -r 837983bac90f audacious/widgets/textbox.c --- 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;