[gnumeric] gnm_utf8_strtol: warning fixes.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] gnm_utf8_strtol: warning fixes.
- Date: Wed, 28 Dec 2011 02:48:51 +0000 (UTC)
commit b44bad2a50ab081bf640851cfc38f19abc087841
Author: Morten Welinder <terra gnome org>
Date: Tue Dec 27 21:48:30 2011 -0500
gnm_utf8_strtol: warning fixes.
src/gutils.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gutils.c b/src/gutils.c
index 1c5c337..42810a9 100644
--- a/src/gutils.c
+++ b/src/gutils.c
@@ -324,26 +324,26 @@ gnm_utf8_strtol (const char *s, char **end)
if (!g_unichar_isdigit (g_utf8_get_char (p))) {
errno = 0;
- *end = s;
+ *end = (char *)s;
return 0;
}
while (g_unichar_isdigit (g_utf8_get_char (p))) {
- int dig = g_unichar_digit_value (g_utf8_get_char (p));
+ guint8 dig = g_unichar_digit_value (g_utf8_get_char (p));
p = g_utf8_next_char (p);
if (res > lim || (res == lim && dig > limd)) {
/* Overflow */
while (g_unichar_isdigit (g_utf8_get_char (p)))
p = g_utf8_next_char (p);
- *end = p;
+ *end = (char *)p;
errno = ERANGE;
return sign < 0 ? LONG_MIN : LONG_MAX;
}
- res = res * 10 + dig;
+ res = res * 10u + dig;
}
- *end = p;
+ *end = (char *)p;
errno = 0;
return sign < 0 ? (long)-res : (long)res;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]