aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/findlocale.c4
-rw-r--r--locale/programs/charset.c8
-rw-r--r--locale/programs/ld-collate.c2
-rw-r--r--locale/programs/ld-monetary.c4
-rw-r--r--locale/programs/locfile.c4
5 files changed, 14 insertions, 8 deletions
diff --git a/locale/findlocale.c b/locale/findlocale.c
index 35b1971aa9..5e87a33886 100644
--- a/locale/findlocale.c
+++ b/locale/findlocale.c
@@ -85,7 +85,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
/* We really have to load some data. First see whether the name is
an alias. Please note that this makes it impossible to have "C"
or "POSIX" as aliases. */
- loc_name = _nl_expand_alias (*name);
+ loc_name = (char *) _nl_expand_alias (*name);
if (loc_name == NULL)
/* It is no alias. */
loc_name = *name;
@@ -144,7 +144,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
/* If the addressed locale is already available it should be freed.
If we would not do this switching back and force between two
locales would slowly eat up all memory.*/
- free (loc_name);
+ free ((void *) loc_name);
if (locale_file->decided == 0)
_nl_load_locale (locale_file, category);
diff --git a/locale/programs/charset.c b/locale/programs/charset.c
index 2e2f63bd9a..a7f988d3a5 100644
--- a/locale/programs/charset.c
+++ b/locale/programs/charset.c
@@ -66,7 +66,7 @@ charset_find_value (const struct charset_t *cs, const char *name, size_t len)
if (find_entry ((hash_table *) &cs->char_table, name, len, &result) < 0)
return ILLEGAL_CHAR_VALUE;
- return (unsigned int) result;
+ return (unsigned int) ((unsigned long int) result);
}
@@ -81,7 +81,8 @@ insert_char (struct linereader *lr, struct charset_t *cs, int bytes,
if (to == NULL)
{
- if (insert_entry (&cs->char_table, from, strlen (from), (void *) value)
+ if (insert_entry (&cs->char_table, from, strlen (from),
+ (void *) (unsigned long int) value)
< 0)
lr_error (lr, _("duplicate character name `%s'"), from);
@@ -126,7 +127,8 @@ insert_char (struct linereader *lr, struct charset_t *cs, int bytes,
{
sprintf (&buf[prefix_len], "%0d", cnt);
- if (insert_entry (&cs->char_table, buf, len1, (void *) cnt) < 0)
+ if (insert_entry (&cs->char_table, buf, len1,
+ (void *) (unsigned long int) cnt) < 0)
lr_error (lr, _("duplicate character name `%s'"), buf);
}
}
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index 629df90ced..4bdf0b2256 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -233,7 +233,7 @@ collate_finish (struct localedef_t *locale, struct charset_t *charset)
else if (find_entry (&collate->symbols, patch->token, toklen, &ptmp)
>= 0)
{
- value = (unsigned int) ptmp;
+ value = (unsigned long int) ptmp;
}
else
value = 0;
diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c
index a717377a8b..5efa969baa 100644
--- a/locale/programs/ld-monetary.c
+++ b/locale/programs/ld-monetary.c
@@ -164,8 +164,12 @@ value for field `%s' in category `%s' must not be the empty string"),
value for field `%s' in category `%s' must be in range %d...%d"), \
#cat, "LC_MONETARY", min, max)
+#if 0
+ /* The following two test are not really necessary because all values
+ the variable could have are valid. */
TEST_ELEM (int_frac_digits, -128, 127); /* No range check. */
TEST_ELEM (frac_digits, -128, 127); /* No range check. */
+#endif
TEST_ELEM (p_cs_precedes, -1, 1);
TEST_ELEM (p_sep_by_space, -1, 2);
TEST_ELEM (n_cs_precedes, -1, 1);
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
index 89dc6bb539..3bbe479017 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -935,7 +935,7 @@ write_locale_data (const char *output_path, const char *category,
int fd;
char *fname;
- asprintf (&fname, "%s/%s", output_path, category);
+ asprintf (&fname, "%s%s", output_path, category);
fd = creat (fname, 0666);
if (fd == -1)
{
@@ -944,7 +944,7 @@ write_locale_data (const char *output_path, const char *category,
if (errno == EISDIR)
{
free (fname);
- asprintf (&fname, "%1$s/%2$s/SYS_%2$s", output_path, category);
+ asprintf (&fname, "%1$s%2$s/SYS_%2$s", output_path, category);
fd = creat (fname, 0666);
if (fd == -1)
save_err = errno;