From 1d8f77534a9d41f754974b37ece12dd44544707e Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Thu, 10 Dec 2009 22:12:51 +0000 Subject: [PATCH] add casts to remove error on warnings git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15882 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_mprintf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/switch_mprintf.c b/src/switch_mprintf.c index 64d83652b3..2b487170f1 100644 --- a/src/switch_mprintf.c +++ b/src/switch_mprintf.c @@ -245,7 +245,7 @@ static int vxprintf( char buf[etBUFSIZE]; /* Conversion buffer */ char prefix; /* Prefix character. "+" or "-" or " " or '\0'. */ etByte errorflag = 0; /* True if an error is encountered */ - etByte xtype; /* Conversion paradigm */ + etByte xtype = 0; /* Conversion paradigm */ char *zExtra; /* Extra memory used for etTCLESCAPE conversions */ static const char spaces[] = " "; @@ -517,7 +517,7 @@ static int vxprintf( *(bufpt++) = '0'; }else{ for(; e2>=0; e2--){ - *(bufpt++) = et_getdigit(&realvalue,&nsd); + *(bufpt++) = (char)et_getdigit(&realvalue,&nsd); } } /* The decimal point */ @@ -531,7 +531,7 @@ static int vxprintf( } /* Significant digits after the decimal point */ while( (precision--)>0 ){ - *(bufpt++) = et_getdigit(&realvalue,&nsd); + *(bufpt++) = (char)et_getdigit(&realvalue,&nsd); } /* Remove trailing zeros and the "." if no digits follow the "." */ if( flag_rtz && flag_dp ){ @@ -554,10 +554,10 @@ static int vxprintf( *(bufpt++) = '+'; } if( exp>=100 ){ - *(bufpt++) = (exp/100)+'0'; /* 100's digit */ + *(bufpt++) = (char)(exp/100)+'0'; /* 100's digit */ exp %= 100; } - *(bufpt++) = exp/10+'0'; /* 10's digit */ + *(bufpt++) = (char)exp/10+'0'; /* 10's digit */ *(bufpt++) = exp%10+'0'; /* 1's digit */ } *bufpt = 0; @@ -593,9 +593,9 @@ static int vxprintf( break; case etCHARLIT: case etCHARX: - c = buf[0] = (xtype==etCHARX ? va_arg(ap,int) : *++fmt); + c = buf[0] = (char)(xtype==etCHARX ? va_arg(ap,int) : *++fmt); if( precision>=0 ){ - for(idx=1; idx