ICU-900 Fixed some compiler warnings.

X-SVN-Rev: 8766
This commit is contained in:
George Rhoten 2002-06-01 06:36:02 +00:00
parent 869dfa4583
commit 0078f2f53e
5 changed files with 26 additions and 22 deletions

View file

@ -4,8 +4,8 @@
* Corporation and others. All Rights Reserved.
**********************************************************************
* $Source: /xsrl/Nsvn/icu/icu/source/common/usetiter.cpp,v $
* $Date: 2002/05/29 18:33:33 $
* $Revision: 1.1 $
* $Date: 2002/06/01 06:36:02 $
* $Revision: 1.2 $
**********************************************************************
*/
#include "unicode/usetiter.h"
@ -19,8 +19,8 @@ U_NAMESPACE_BEGIN
* Create an iterator
* @param set set to iterate over
*/
UnicodeSetIterator::UnicodeSetIterator(const UnicodeSet& set) {
reset(set);
UnicodeSetIterator::UnicodeSetIterator(const UnicodeSet& uSet) {
reset(uSet);
}
/**
@ -96,8 +96,8 @@ UBool UnicodeSetIterator::nextRange() {
/**
*@param set the set to iterate over. This allows reuse of the iterator.
*/
void UnicodeSetIterator::reset(const UnicodeSet& set) {
this->set = &set;
void UnicodeSetIterator::reset(const UnicodeSet& uSet) {
this->set = &uSet;
reset();
}
@ -122,9 +122,9 @@ void UnicodeSetIterator::reset() {
nextString = 0;
}
void UnicodeSetIterator::loadRange(int32_t range) {
nextElement = set->getRangeStart(range);
endElement = set->getRangeEnd(range);
void UnicodeSetIterator::loadRange(int32_t iRange) {
nextElement = set->getRangeStart(iRange);
endElement = set->getRangeEnd(iRange);
}
U_NAMESPACE_END

View file

@ -41,9 +41,9 @@ DecimalFormatSymbols::DecimalFormatSymbols(UErrorCode& status)
// -------------------------------------
// Initializes this with the decimal format symbols in the desired locale.
DecimalFormatSymbols::DecimalFormatSymbols(const Locale& locale, UErrorCode& status)
DecimalFormatSymbols::DecimalFormatSymbols(const Locale& loc, UErrorCode& status)
{
initialize(locale, status);
initialize(loc, status);
}
// -------------------------------------
@ -99,14 +99,14 @@ DecimalFormatSymbols::operator==(const DecimalFormatSymbols& that) const
// -------------------------------------
void
DecimalFormatSymbols::initialize(const Locale& locale, UErrorCode& status,
DecimalFormatSymbols::initialize(const Locale& loc, UErrorCode& status,
UBool useLastResortData)
{
if (U_FAILURE(status)) return;
this->locale = locale;
this->locale = loc;
ResourceBundle resource((char *)0, locale, status);
ResourceBundle resource((char *)0, loc, status);
if (U_FAILURE(status))
{
// Initializes with last resort data if necessary.

View file

@ -2000,7 +2000,7 @@ static void TestUScriptCodeAPI(){
struct RunTestData
{
char *runText;
const char *runText;
UScriptCode runCode;
};
@ -2048,7 +2048,7 @@ CheckScriptRuns(UScriptRun *scriptRun, int32_t *runStarts, const RunTestData *te
static void
TestUScriptRunAPI()
{
const RunTestData testData[] = {
static const RunTestData testData[] = {
{"\\u0020\\u0946\\u0939\\u093F\\u0928\\u094D\\u0926\\u0940\\u0020", USCRIPT_DEVANAGARI},
{"\\u0627\\u0644\\u0639\\u0631\\u0628\\u064A\\u0629\\u0020", USCRIPT_ARABIC},
{"\\u0420\\u0443\\u0441\\u0441\\u043A\\u0438\\u0439\\u0020", USCRIPT_CYRILLIC},

View file

@ -13,19 +13,19 @@
ResBundTestDataDriver::ResBundTestDataDriver(const char* testName, UErrorCode &status)
: TestDataDriver(testName),
fTestBundle(NULL),
fParsing(NULL),
fPurpose(NULL),
fParsing(NULL),
fModuleSettings(NULL),
fCurrentTest(NULL),
fTestData(NULL),
fCurrentTest(NULL),
fTestSettings(NULL),
fCurrentSettings(NULL),
fTestCases(NULL),
fCurrentCase(NULL),
fDataTestValid(TRUE),
tdpath(NULL)
{
fNumberOfTests = 0;
fDataTestValid = TRUE;
fTestBundle = getTestBundle(testName);
if(fDataTestValid) {
fPurpose = ures_getByKey(fTestBundle, "TestPurpose", NULL, &status);
@ -234,7 +234,8 @@ ResBundTestDataDriver::loadTestData(UErrorCode& err){
if(U_FAILURE(err)){
err = U_FILE_ACCESS_ERROR;
errln("construction of NULL did not succeed : %s \n", u_errorName(err));
return "";
strcpy(tdpath, "");
return tdpath;
}
ures_close(test);
return tdpath;

View file

@ -790,9 +790,10 @@ derivedCorePropsIndex[]={
UCHAR_GRAPHEME_BASE
};
U_CDECL_BEGIN
void U_CALLCONV
UnicodeTest::derivedCorePropsLineFn(void *context,
char *fields[][2], int32_t fieldCount,
char *fields[][2], int32_t /* fieldCount */,
UErrorCode *pErrorCode) {
UnicodeTest *me=(UnicodeTest *)context;
uint32_t start, end;
@ -813,6 +814,7 @@ UnicodeTest::derivedCorePropsLineFn(void *context,
me->derivedCoreProps[i].add(start, end);
}
U_CDECL_END
void UnicodeTest::TestAdditionalProperties() {
// test DerivedCoreProperties.txt
@ -867,7 +869,8 @@ void UnicodeTest::TestAdditionalProperties() {
// now we have all derived core properties in the UnicodeSets
// run them all through the API
int32_t i, rangeCount, range;
int32_t rangeCount, range;
uint32_t i;
UChar32 start, end;
// test all TRUE properties