ICU-535 Fixed some compiler warnings.
X-SVN-Rev: 2969
This commit is contained in:
parent
4c09473098
commit
9ebd873d92
@ -973,7 +973,7 @@ static void TestConvert()
|
||||
free((void*)my_ucs_file_buffer);
|
||||
}
|
||||
|
||||
void WriteToFile(const UChar *a, FILE *myfile)
|
||||
static void WriteToFile(const UChar *a, FILE *myfile)
|
||||
{
|
||||
uint32_t size = u_strlen(a);
|
||||
uint16_t i = 0;
|
||||
@ -988,7 +988,7 @@ void WriteToFile(const UChar *a, FILE *myfile)
|
||||
}
|
||||
}
|
||||
|
||||
int32_t strCaseIcmp(const char* a1, const char * a2)
|
||||
static int32_t strCaseIcmp(const char* a1, const char * a2)
|
||||
{
|
||||
int32_t i=0, ret=0;
|
||||
while(a1[i]&&a2[i])
|
||||
@ -999,13 +999,13 @@ int32_t strCaseIcmp(const char* a1, const char * a2)
|
||||
return ret;
|
||||
}
|
||||
|
||||
UConverterFromUCallback otherUnicodeAction(UConverterFromUCallback MIA)
|
||||
static UConverterFromUCallback otherUnicodeAction(UConverterFromUCallback MIA)
|
||||
{
|
||||
return (MIA==(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_STOP)?(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_SUBSTITUTE:(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_STOP;
|
||||
}
|
||||
|
||||
|
||||
UConverterToUCallback otherCharAction(UConverterToUCallback MIA)
|
||||
static UConverterToUCallback otherCharAction(UConverterToUCallback MIA)
|
||||
{
|
||||
return (MIA==(UConverterToUCallback)UCNV_TO_U_CALLBACK_STOP)?(UConverterToUCallback)UCNV_TO_U_CALLBACK_SUBSTITUTE:(UConverterToUCallback)UCNV_TO_U_CALLBACK_STOP;
|
||||
}
|
||||
|
@ -117,7 +117,8 @@ const static int32_t results[TESTLOCALES][TOTALTESTSET] = {
|
||||
/* analogous to Japanese rules " & aa ; a- & ee ; e- & ii ; i- & oo ; o- & uu ; u- " */ /* loop to TOTALTESTSET */
|
||||
{ 19, 22, 21, 23, 24, 25, 12, 13, 9, 0, 17, 16, 26, 27, 28, 15, 18, 14, 1, 11, 2, 3, 4, 5, 20, 6, 8, 10, 7, 29 }
|
||||
};
|
||||
UChar*
|
||||
|
||||
static UChar*
|
||||
my_strncpy(UChar *dst,
|
||||
const UChar *src,
|
||||
int32_t n)
|
||||
@ -131,7 +132,7 @@ my_strncpy(UChar *dst,
|
||||
return anchor;
|
||||
}
|
||||
|
||||
UChar*
|
||||
static UChar*
|
||||
my_strcat(UChar *dst,
|
||||
const UChar *src,
|
||||
int32_t n)
|
||||
@ -147,6 +148,7 @@ my_strcat(UChar *dst,
|
||||
|
||||
return anchor;
|
||||
}
|
||||
|
||||
void addRuleBasedCollTest(TestNode** root)
|
||||
{
|
||||
addTest(root, &TestG7Locales, "tscoll/cg7coll/TestG7Locales");
|
||||
@ -157,7 +159,8 @@ void addRuleBasedCollTest(TestNode** root)
|
||||
|
||||
|
||||
}
|
||||
void doTest(UCollator *myCollation, const UChar source[], const UChar target[], UCollationResult result)
|
||||
|
||||
static void doTest(UCollator *myCollation, const UChar source[], const UChar target[], UCollationResult result)
|
||||
{
|
||||
int32_t sortklen1, sortklen2, sortklenmax, sortklenmin;
|
||||
int32_t temp;
|
||||
@ -188,7 +191,7 @@ void doTest(UCollator *myCollation, const UChar source[], const UChar target[],
|
||||
free(sortKey2);
|
||||
}
|
||||
|
||||
void TestG7Locales()
|
||||
static void TestG7Locales()
|
||||
{
|
||||
UCollator *myCollation, *tblColl1;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
@ -235,7 +238,7 @@ void TestG7Locales()
|
||||
}
|
||||
}
|
||||
|
||||
void TestDemo1()
|
||||
static void TestDemo1()
|
||||
{
|
||||
UCollator *col, *myCollation;
|
||||
const UChar *baseRules;
|
||||
@ -281,7 +284,8 @@ void TestDemo1()
|
||||
free(temp);
|
||||
free(newRules);
|
||||
}
|
||||
void TestDemo2()
|
||||
|
||||
static void TestDemo2()
|
||||
{
|
||||
UCollator *col, *myCollation;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
@ -326,7 +330,7 @@ void TestDemo2()
|
||||
|
||||
}
|
||||
|
||||
void TestDemo3()
|
||||
static void TestDemo3()
|
||||
{
|
||||
UCollator *col, *myCollation;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
@ -372,7 +376,7 @@ void TestDemo3()
|
||||
|
||||
}
|
||||
|
||||
void TestDemo4()
|
||||
static void TestDemo4()
|
||||
{
|
||||
UCollator *col, *myCollation;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
@ -47,23 +47,23 @@
|
||||
|
||||
|
||||
/* main test routine, tests comparisons for a set of strings against sets of expected results */
|
||||
static void doTest(UCollator *myCollation, const UChar* source, const UChar* target, UCollationResult result);
|
||||
static void doTest(UCollator *myCollation, const UChar* source, const UChar* target, UCollationResult result);
|
||||
|
||||
/* perform test for G7 locales */
|
||||
void TestG7Locales(void);
|
||||
static void TestG7Locales(void);
|
||||
|
||||
/* perform test with added rules " & Z < p, P" */
|
||||
void TestDemo1(void);
|
||||
static void TestDemo1(void);
|
||||
|
||||
/* perorm test with added rules "& C < ch , cH, Ch, CH" */
|
||||
void TestDemo2(void);
|
||||
static void TestDemo2(void);
|
||||
|
||||
/* perform test with added rules */
|
||||
/* "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'" */
|
||||
void TestDemo3(void);
|
||||
static void TestDemo3(void);
|
||||
|
||||
/* perform test with added rules */
|
||||
/* " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' " */
|
||||
void TestDemo4(void);
|
||||
static void TestDemo4(void);
|
||||
|
||||
#endif
|
||||
|
@ -22,20 +22,20 @@
|
||||
static void TestBasic(void);
|
||||
static void TestOtherAPI(void);
|
||||
|
||||
int32_t hashChars(const void* key);
|
||||
static int32_t hashChars(const void* key);
|
||||
|
||||
UBool isEqualChars(const void* key1, const void* key2);
|
||||
static UBool isEqualChars(const void* key1, const void* key2);
|
||||
|
||||
static void _put(UHashtable* hash,
|
||||
const char* key,
|
||||
int32_t value,
|
||||
int32_t expectedOldValue);
|
||||
|
||||
void _get(UHashtable* hash,
|
||||
static void _get(UHashtable* hash,
|
||||
const char* key,
|
||||
int32_t expectedValue);
|
||||
|
||||
void _remove(UHashtable* hash,
|
||||
static void _remove(UHashtable* hash,
|
||||
const char* key,
|
||||
int32_t expectedValue);
|
||||
|
||||
@ -54,7 +54,7 @@ void addHashtableTest(TestNode** root) {
|
||||
* Test Functions
|
||||
*********************************************************************/
|
||||
|
||||
void TestBasic(void) {
|
||||
static void TestBasic(void) {
|
||||
const char one[4] = {0x6F, 0x6E, 0x65, 0}; /* "one" */
|
||||
const char one2[4] = {0x6F, 0x6E, 0x65, 0}; /* Get around compiler optimizations */
|
||||
const char two[4] = {0x74, 0x77, 0x6F, 0}; /* "two" */
|
||||
@ -107,7 +107,8 @@ void TestBasic(void) {
|
||||
uhash_close(hash);
|
||||
|
||||
}
|
||||
void TestOtherAPI(void){
|
||||
|
||||
static void TestOtherAPI(void){
|
||||
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UHashtable *hash;
|
||||
@ -236,7 +237,7 @@ UBool isEqualChars(const void* key1, const void* key2) {
|
||||
* Wrapper Functions
|
||||
*********************************************************************/
|
||||
|
||||
void _put(UHashtable* hash,
|
||||
static void _put(UHashtable* hash,
|
||||
const char* key,
|
||||
int32_t value,
|
||||
int32_t expectedOldValue) {
|
||||
@ -255,7 +256,7 @@ void _put(UHashtable* hash,
|
||||
}
|
||||
}
|
||||
|
||||
void _get(UHashtable* hash,
|
||||
static void _get(UHashtable* hash,
|
||||
const char* key,
|
||||
int32_t expectedValue) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
@ -272,7 +273,7 @@ void _get(UHashtable* hash,
|
||||
}
|
||||
}
|
||||
|
||||
void _remove(UHashtable* hash,
|
||||
static void _remove(UHashtable* hash,
|
||||
const char* key,
|
||||
int32_t expectedValue) {
|
||||
int32_t value = (int32_t) uhash_remove(hash, key);
|
||||
|
@ -76,6 +76,7 @@ const int32_t tagValues[] =
|
||||
/* Pi */ U_INITIAL_PUNCTUATION,
|
||||
/* Pf */ U_FINAL_PUNCTUATION
|
||||
};
|
||||
|
||||
const char dirStrings[][5] = {
|
||||
"L",
|
||||
"R",
|
||||
@ -357,8 +358,9 @@ static void TestControlPrint()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* u_isJavaIDStart, u_isJavaIDPart, u_isIDStart(), u_isIDPart(), u_isIDIgnorable()*/
|
||||
void TestIdentifier()
|
||||
static void TestIdentifier()
|
||||
{
|
||||
const UChar sampleJavaIDStart[] = {0x0071, 0x00e4, 0x005f};
|
||||
const UChar sampleNonJavaIDStart[] = {0x0020, 0x2030, 0x0082};
|
||||
@ -568,7 +570,7 @@ static int32_t MakeProp(char* str)
|
||||
return result;
|
||||
}
|
||||
|
||||
int32_t MakeDir(char* str)
|
||||
static int32_t MakeDir(char* str)
|
||||
{
|
||||
int32_t pos = 0;
|
||||
for (pos = 0; pos < 19; pos++) {
|
||||
@ -592,7 +594,7 @@ static const char* raw[3][4] = {
|
||||
{ "English_United States", "French_France", "Croatian_Croatia", "English_United States"}
|
||||
};
|
||||
|
||||
void setUpDataTable()
|
||||
U_CFUNC void setUpDataTable()
|
||||
{
|
||||
int32_t i,j;
|
||||
if(dataTable == NULL) {
|
||||
@ -625,7 +627,7 @@ U_CFUNC void cleanUpDataTable()
|
||||
}
|
||||
|
||||
/*Tests for u_strcat(),u_strcmp(), u_strlen(), u_strcpy(),u_strncat(),u_strncmp(),u_strncpy, u_uastrcpy(),u_austrcpy(), u_uastrncpy(); */
|
||||
void TestStringFunctions()
|
||||
static void TestStringFunctions()
|
||||
{
|
||||
|
||||
int32_t i,j,k;
|
||||
|
@ -439,7 +439,7 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U
|
||||
|
||||
|
||||
|
||||
void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
|
||||
static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
|
||||
{
|
||||
|
||||
UChar SBCSText[] =
|
||||
|
@ -38,7 +38,7 @@ addCompactArrayTest(TestNode** root)
|
||||
|
||||
}
|
||||
|
||||
void TestUCMP16API(){
|
||||
static void TestUCMP16API(){
|
||||
int16_t newValues[]={
|
||||
0x00, 0x01, 0x02, 0x03, 0x04,
|
||||
0x05, 0x06, 0x07, 0x08, 0x09,
|
||||
@ -183,7 +183,7 @@ void TestUCMP16API(){
|
||||
|
||||
}
|
||||
|
||||
void TestUCMP8API(){
|
||||
static void TestUCMP8API(){
|
||||
CompactByteArray* ucmp8Array=NULL;
|
||||
CompactByteArray* ucmp8Array1=NULL;
|
||||
CompactByteArray* ucmp8Array2=NULL;
|
||||
@ -277,7 +277,7 @@ void TestUCMP8API(){
|
||||
ucmp8_close(ucmp8Array2);
|
||||
}
|
||||
|
||||
void TestUCMP32API(){
|
||||
static void TestUCMP32API(){
|
||||
CompactIntArray* ucmp32Array=NULL;
|
||||
|
||||
int32_t i=0;
|
||||
|
Loading…
Reference in New Issue
Block a user