提交 1d8f7753 authored 作者: Jeff Lenk's avatar Jeff Lenk

add casts to remove error on warnings

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15882 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 c2cde58f
...@@ -245,7 +245,7 @@ static int vxprintf( ...@@ -245,7 +245,7 @@ static int vxprintf(
char buf[etBUFSIZE]; /* Conversion buffer */ char buf[etBUFSIZE]; /* Conversion buffer */
char prefix; /* Prefix character. "+" or "-" or " " or '\0'. */ char prefix; /* Prefix character. "+" or "-" or " " or '\0'. */
etByte errorflag = 0; /* True if an error is encountered */ 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 */ char *zExtra; /* Extra memory used for etTCLESCAPE conversions */
static const char spaces[] = static const char spaces[] =
" "; " ";
...@@ -517,7 +517,7 @@ static int vxprintf( ...@@ -517,7 +517,7 @@ static int vxprintf(
*(bufpt++) = '0'; *(bufpt++) = '0';
}else{ }else{
for(; e2>=0; e2--){ for(; e2>=0; e2--){
*(bufpt++) = et_getdigit(&realvalue,&nsd); *(bufpt++) = (char)et_getdigit(&realvalue,&nsd);
} }
} }
/* The decimal point */ /* The decimal point */
...@@ -531,7 +531,7 @@ static int vxprintf( ...@@ -531,7 +531,7 @@ static int vxprintf(
} }
/* Significant digits after the decimal point */ /* Significant digits after the decimal point */
while( (precision--)>0 ){ while( (precision--)>0 ){
*(bufpt++) = et_getdigit(&realvalue,&nsd); *(bufpt++) = (char)et_getdigit(&realvalue,&nsd);
} }
/* Remove trailing zeros and the "." if no digits follow the "." */ /* Remove trailing zeros and the "." if no digits follow the "." */
if( flag_rtz && flag_dp ){ if( flag_rtz && flag_dp ){
...@@ -554,10 +554,10 @@ static int vxprintf( ...@@ -554,10 +554,10 @@ static int vxprintf(
*(bufpt++) = '+'; *(bufpt++) = '+';
} }
if( exp>=100 ){ if( exp>=100 ){
*(bufpt++) = (exp/100)+'0'; /* 100's digit */ *(bufpt++) = (char)(exp/100)+'0'; /* 100's digit */
exp %= 100; 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++) = exp%10+'0'; /* 1's digit */
} }
*bufpt = 0; *bufpt = 0;
...@@ -593,9 +593,9 @@ static int vxprintf( ...@@ -593,9 +593,9 @@ static int vxprintf(
break; break;
case etCHARLIT: case etCHARLIT:
case etCHARX: 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 ){ if( precision>=0 ){
for(idx=1; idx<precision; idx++) buf[idx] = c; for(idx=1; idx<precision; idx++) buf[idx] = (char)c;
length = precision; length = precision;
}else{ }else{
length =1; length =1;
...@@ -635,8 +635,8 @@ static int vxprintf( ...@@ -635,8 +635,8 @@ static int vxprintf(
j = 0; j = 0;
if( needQuote ) bufpt[j++] = '\''; if( needQuote ) bufpt[j++] = '\'';
for(i=0; (ch=escarg[i])!=0; i++){ for(i=0; (ch=escarg[i])!=0; i++){
bufpt[j++] = ch; bufpt[j++] = (char)ch;
if( ch=='\'' || ( xtype==etSQLESCAPE3 && ch=='\\')) bufpt[j++] = ch; if( ch=='\'' || ( xtype==etSQLESCAPE3 && ch=='\\')) bufpt[j++] = (char)ch;
} }
if( needQuote ) bufpt[j++] = '\''; if( needQuote ) bufpt[j++] = '\'';
bufpt[j] = 0; bufpt[j] = 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论