summaryrefslogtreecommitdiff
path: root/app/wlib/mswlib/simple-gettext.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
commit5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch)
treece8982b6c0111f79791068de2c2d4c6ce3138a49 /app/wlib/mswlib/simple-gettext.c
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
New upstream version 5.2.2GAupstream/5.2.2GA
Diffstat (limited to 'app/wlib/mswlib/simple-gettext.c')
-rw-r--r--app/wlib/mswlib/simple-gettext.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/wlib/mswlib/simple-gettext.c b/app/wlib/mswlib/simple-gettext.c
index 412eece..951ce4c 100644
--- a/app/wlib/mswlib/simple-gettext.c
+++ b/app/wlib/mswlib/simple-gettext.c
@@ -224,7 +224,7 @@ load_domain( const char *filename )
to_read = size;
read_ptr = (char *) data;
do {
- unsigned long int nb = fread( read_ptr, 1, to_read, fp );
+ unsigned long int nb = (unsigned int)fread( read_ptr, 1, to_read, fp );
if( nb < to_read ) {
fclose (fp);
free(data);
@@ -341,7 +341,7 @@ get_string( struct loaded_domain *domain, u32 idx )
domain->mapped[idx] = 1;
plen = strlen (p);
- buf = utf8_to_native (p, plen, -1);
+ buf = utf8_to_native (p, (unsigned int)plen, -1);
buflen = strlen (buf);
if (buflen <= plen){
strcpy (p, buf);
@@ -392,7 +392,7 @@ gettext( const char *msgid )
/* Locate the MSGID and its translation. */
if( domain->hash_size > 2 && domain->hash_tab ) {
/* Use the hashing table. */
- u32 len = strlen (msgid);
+ u32 len = (u32)strlen (msgid);
u32 hash_val = hash_string (msgid);
u32 idx = hash_val % domain->hash_size;
u32 incr = 1 + (hash_val % (domain->hash_size - 2));
@@ -444,7 +444,7 @@ gettext( const char *msgid )
else if (cmp_val > 0)
bottom = act + 1;
else
- return (char *)get_string( domain, act );
+ return (char *)get_string( domain, (int)(act) );
}
not_found: