ICU-900 Fixed some compiler warnings

X-SVN-Rev: 5509
This commit is contained in:
George Rhoten 2001-08-17 03:26:40 +00:00
parent 2edb18e9b7
commit 69e092674f
2 changed files with 4 additions and 9 deletions

View File

@ -187,7 +187,6 @@ processFile(const char *filename, const char *cp, const char *inputDir, const ch
if(inputDir == NULL) {
in = T_FileStream_open(filename, "rb");
} else {
char *openFileName = NULL;
int32_t dirlen = uprv_strlen(inputDir);
int32_t filelen = uprv_strlen(filename);
if(inputDir[dirlen-1] != U_FILE_SEP_CHAR) {

View File

@ -110,13 +110,6 @@ static uint32_t inputdirLength;
static struct SResource *parseResource(char *tag, UErrorCode *status);
static char *u2c(UChar *str)
{
static char buffer[1024];
u_austrcpy(buffer, str);
return buffer;
}
void initParser(void)
{
uint32_t i;
@ -324,8 +317,11 @@ parseResourceType(UErrorCode *status)
} else if (u_strcmp(tokenValue->fChars, k_type_reserved) == 0) {
result = RT_RESERVED;
} else {
char tokenBuffer[1024];
u_austrncpy(tokenBuffer, tokenValue->fChars, sizeof(tokenBuffer));
tokenBuffer[sizeof(tokenBuffer)] = 0;
*status = U_INVALID_FORMAT_ERROR;
error(line, "unknown resource type '%s'", u2c(tokenValue->fChars));
error(line, "unknown resource type '%s'", tokenBuffer);
}
return result;