mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 21:45:37 +00:00
ICU-2194 fix compiler warnings and failure of testidn for out of source builds
X-SVN-Rev: 11575
This commit is contained in:
parent
3d61951c5c
commit
2e11ec438a
2 changed files with 14 additions and 15 deletions
|
@ -583,12 +583,6 @@ getNextSeparator(UChar *src,int32_t srcLength,NamePrepTransform* prep,
|
|||
|
||||
}
|
||||
}
|
||||
// we have not found the delimiter
|
||||
if(i==srcLength){
|
||||
*limit = src+srcLength;
|
||||
*done = TRUE;
|
||||
}
|
||||
return i;
|
||||
}else{
|
||||
int32_t i;
|
||||
for(i=0;i<srcLength;i++){
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: genidn.c
|
||||
* file name: testidn.c
|
||||
* encoding: US-ASCII
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
|
@ -119,17 +119,19 @@ testData(TestIDNA& test) {
|
|||
|
||||
//initialize
|
||||
pTestIDNA = &test;
|
||||
|
||||
/* prepare the filename beginning with the source dir */
|
||||
if(srcDir[0] == U_FILE_SEP_CHAR){
|
||||
filename[0]= 0x2E;
|
||||
uprv_strcat(filename+1,srcDir);
|
||||
}else if(uprv_strchr(srcDir,U_FILE_SEP_CHAR) == NULL){
|
||||
if(uprv_strchr(srcDir,U_FILE_SEP_CHAR) == NULL){
|
||||
filename[0] = 0x2E;
|
||||
filename[1] = U_FILE_SEP_CHAR;
|
||||
uprv_strcpy(filename+2,srcDir);
|
||||
}else{
|
||||
uprv_strcpy(filename, srcDir);
|
||||
}
|
||||
basename=filename+uprv_strlen(filename);
|
||||
if(basename>filename && *(basename-1)!=U_FILE_SEP_CHAR) {
|
||||
*basename++=U_FILE_SEP_CHAR;
|
||||
}
|
||||
|
||||
/* process unassigned */
|
||||
basename=filename+uprv_strlen(filename);
|
||||
|
@ -137,10 +139,13 @@ testData(TestIDNA& test) {
|
|||
*basename++=U_FILE_SEP_CHAR;
|
||||
}
|
||||
|
||||
/* first copy misc directory */
|
||||
saveBasename = basename;
|
||||
uprv_strcpy(basename,MISC_DIR);
|
||||
basename= basename + uprv_strlen(MISC_DIR);
|
||||
*basename++ = U_FILE_SEP_CHAR;
|
||||
basename = basename + uprv_strlen(MISC_DIR);
|
||||
*basename++=U_FILE_SEP_CHAR;
|
||||
|
||||
/* process unassigned */
|
||||
uprv_strcpy(basename,fileNames[0]);
|
||||
parseTable(filename,TRUE, test,&errorCode);
|
||||
if(U_FAILURE(errorCode)) {
|
||||
|
@ -216,7 +221,7 @@ parseMappings(const char *filename,UBool withNorm, UBool reportError, TestIDNA&
|
|||
//fprintf(stdout,"Number of code points that have mappings with length >1 : %i\n",len);
|
||||
|
||||
if(U_FAILURE(*pErrorCode) && (reportError || *pErrorCode!=U_FILE_ACCESS_ERROR)) {
|
||||
test.errln( "genidn error: u_parseDelimitedFile(\"%s\") failed - %s\n", filename, u_errorName(*pErrorCode));
|
||||
test.errln( "testidn error: u_parseDelimitedFile(\"%s\") failed - %s\n", filename, u_errorName(*pErrorCode));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,7 +261,7 @@ parseTable(const char *filename,UBool isUnassigned,TestIDNA& test, UErrorCode *p
|
|||
|
||||
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
test.errln( "genidn error: u_parseDelimitedFile(\"%s\") failed - %s\n", filename, u_errorName(*pErrorCode));
|
||||
test.errln( "testidn error: u_parseDelimitedFile(\"%s\") failed - %s\n", filename, u_errorName(*pErrorCode));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue