aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-03-23 15:25:54 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-03-23 15:25:54 +0000
commitf8426a2c441a63b5d207e92a8509428dfb7fb1dc (patch)
tree95c61ff461caf6594de48ee20ec6511f27e06a0a /lib
parent0c791d1e76185fa6667d566808e74119dc8fba95 (diff)
stricter variable type usage
Diffstat (limited to 'lib')
-rw-r--r--lib/mprintf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 3b06ab5ab..ddf34edf8 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -122,8 +122,8 @@ enum {
typedef struct {
FormatType type;
int flags;
- int width; /* width OR width parameter number */
- int precision; /* precision OR precision parameter number */
+ long width; /* width OR width parameter number */
+ long precision; /* precision OR precision parameter number */
union {
char *str;
void *ptr;
@@ -281,7 +281,8 @@ int dprintf_Pass1Report(va_stack_t *vto, int max)
*
******************************************************************/
-static int dprintf_Pass1(char *format, va_stack_t *vto, char **endpos, va_list arglist)
+static long dprintf_Pass1(char *format, va_stack_t *vto, char **endpos,
+ va_list arglist)
{
char *fmt = format;
int param_num = 0;
@@ -681,7 +682,7 @@ static int dprintf_formatf(
else
prec = -1;
- alt = p->flags & FLAGS_ALT;
+ alt = (p->flags & FLAGS_ALT)?TRUE:FALSE;
switch (p->type) {
case FORMAT_INT:
@@ -1042,7 +1043,7 @@ static int alloc_addbyter(int output, FILE *data)
infop->alloc *= 2;
}
- infop->buffer[ infop->len ] = output;
+ infop->buffer[ infop->len ] = (char)output;
infop->len++;