From f059c857b202a2428b1b4757de2d3d9f23fdf9a3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 14 Aug 2008 19:09:33 +0200 Subject: enable a few additional gcc warnings and fix all problems found --- src/sound-theme-spec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sound-theme-spec.c') diff --git a/src/sound-theme-spec.c b/src/sound-theme-spec.c index f9c58d4..65aaba9 100644 --- a/src/sound-theme-spec.c +++ b/src/sound-theme-spec.c @@ -493,7 +493,7 @@ static int find_sound_for_locale( if ((e = strchr(locale, '@'))) { char *t; - if (!(t = ca_strndup(locale, e - locale))) + if (!(t = ca_strndup(locale, (size_t) (e - locale)))) return CA_ERROR_OOM; ret = find_sound_in_locale(f, theme, name, path, t, subdir); @@ -507,7 +507,7 @@ static int find_sound_for_locale( if ((e = strchr(locale, '_'))) { char *t; - if (!(t = ca_strndup(locale, e - locale))) + if (!(t = ca_strndup(locale, (size_t) (e - locale)))) return CA_ERROR_OOM; ret = find_sound_in_locale(f, theme, name, path, t, subdir); @@ -555,7 +555,7 @@ static int find_sound_for_name( } while (*k != '-'); - if (!(n = ca_strndup(name, k-name))) + if (!(n = ca_strndup(name, (size_t) (k-name)))) return CA_ERROR_OOM; if ((ret = find_sound_for_locale(f, t, n, path, locale, subdir)) != CA_ERROR_NOTFOUND) { -- cgit