ICU-3499 Fix some warnings

X-SVN-Rev: 15634
This commit is contained in:
George Rhoten 2004-05-30 07:21:16 +00:00
parent 033ebdd562
commit a718a375c8
2 changed files with 15 additions and 19 deletions

View File

@ -499,14 +499,10 @@ u_printf_uinteger_handler(const u_printf_stream_handler *handler,
int64_t num = args[0].int64Value;
UNumberFormat *format;
UChar result[UPRINTF_BUFFER_SIZE];
UChar prefixBuffer[UPRINTF_BUFFER_SIZE];
int32_t prefixBufferLen = sizeof(prefixBuffer);
int32_t minDigits = -1;
int32_t resultLen;
UErrorCode status = U_ZERO_ERROR;
prefixBuffer[0] = 0;
/* TODO: Fix this once uint64_t can be formatted. */
if (info->fIsShort)
num &= UINT16_MAX;

View File

@ -691,15 +691,15 @@ u_scanf_string_handler(UFILE *input,
int32_t *fmtConsumed,
int32_t *argConverted)
{
UChar c;
UBool isNotEOF;
int32_t count;
const UChar *source;
UConverter *conv;
UErrorCode status = U_ZERO_ERROR;
char *arg = (char*)(args[0].ptrValue);
char *alias = arg;
char *limit;
UErrorCode status = U_ZERO_ERROR;
int32_t count;
UChar c;
UBool isNotEOF = FALSE;
/* skip all ws in the input */
if (info->fIsString) {
@ -748,7 +748,7 @@ u_scanf_string_handler(UFILE *input,
/* put the final character we read back on the input */
if (!info->fSkipArg) {
if(isNotEOF && (info->fWidth == -1 || count < info->fWidth) )
if ((info->fWidth == -1 || count < info->fWidth) && isNotEOF)
u_fungetc(c, input);
/* add the terminator */
@ -788,11 +788,11 @@ u_scanf_ustring_handler(UFILE *input,
int32_t *fmtConsumed,
int32_t *argConverted)
{
UChar c;
UBool isNotEOF;
int32_t count;
UChar *arg = (UChar*)(args[0].ptrValue);
UChar *alias = arg;
int32_t count;
UChar c;
UBool isNotEOF = FALSE;
/* skip all ws in the input */
if (info->fIsString) {
@ -818,7 +818,7 @@ u_scanf_ustring_handler(UFILE *input,
/* put the final character we read back on the input */
if (!info->fSkipArg) {
if(isNotEOF && (info->fWidth == -1 || count < info->fWidth)) {
if((info->fWidth == -1 || count < info->fWidth) && isNotEOF) {
u_fungetc(c, input);
}