summaryrefslogtreecommitdiff
path: root/lib/mprintf.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-02-01 01:42:13 +0000
committerYang Tse <yangsita@gmail.com>2007-02-01 01:42:13 +0000
commit54db98c220255737456b1311cb9534c9e95215c6 (patch)
treea9ee1b3e102a5d9c099068a220412e5989f520d8 /lib/mprintf.c
parent5565f45f5e5213df213336f99d19a471c1ac2632 (diff)
downloadcurl-54db98c220255737456b1311cb9534c9e95215c6.tar.gz
compiler warning fix
Diffstat (limited to 'lib/mprintf.c')
-rw-r--r--lib/mprintf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 610395318..3224521b0 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -694,7 +694,7 @@ static int dprintf_formatf(
else
prec = -1;
- alt = (p->flags & FLAGS_ALT)?TRUE:FALSE;
+ alt = (char)((p->flags & FLAGS_ALT)?TRUE:FALSE);
switch (p->type) {
case FORMAT_INT:
@@ -734,14 +734,14 @@ static int dprintf_formatf(
#ifdef ENABLE_64BIT
if(p->flags & FLAGS_LONGLONG) {
/* long long */
- is_neg = p->data.lnum < 0;
+ is_neg = (char)(p->data.lnum < 0);
num = is_neg ? (- p->data.lnum) : p->data.lnum;
}
else
#endif
{
signed_num = (long) num;
- is_neg = signed_num < 0;
+ is_neg = (char)(signed_num < 0);
num = is_neg ? (- signed_num) : signed_num;
}
goto number;
@@ -944,9 +944,9 @@ static int dprintf_formatf(
*fptr++ = 'l';
if (p->flags & FLAGS_FLOATE)
- *fptr++ = p->flags&FLAGS_UPPER ? 'E':'e';
+ *fptr++ = (char)((p->flags & FLAGS_UPPER) ? 'E':'e');
else if (p->flags & FLAGS_FLOATG)
- *fptr++ = p->flags & FLAGS_UPPER ? 'G' : 'g';
+ *fptr++ = (char)((p->flags & FLAGS_UPPER) ? 'G' : 'g');
else
*fptr++ = 'f';