ICU-3222 fix compiler warnings

X-SVN-Rev: 13935
This commit is contained in:
Ram Viswanadha 2003-12-02 03:03:23 +00:00
parent 838b8bdfae
commit 3bd47e974e
6 changed files with 19 additions and 22 deletions

View file

@ -145,10 +145,9 @@ static inline UBool isLabelSeparator(UChar ch){
// if *limit == separator then the length returned does not include
// the separtor.
static inline int32_t
getNextSeparator(UChar *src,int32_t srcLength,UStringPrepProfile* nameprep,
getNextSeparator(UChar *src,int32_t srcLength,
UChar **limit,
UBool *done,
UErrorCode *status){
UBool *done){
if(srcLength == -1){
int32_t i;
for(i=0 ; ;i++){
@ -658,7 +657,7 @@ uidna_IDNToASCII( const UChar *src, int32_t srcLength,
for(;;){
labelLen = getNextSeparator(labelStart,remainingLen, nameprep, &delimiter,&done, status);
labelLen = getNextSeparator(labelStart,remainingLen, &delimiter,&done);
labelReqLength = _internal_toASCII( labelStart, labelLen,
currentDest, remainingDestCapacity,
@ -743,7 +742,7 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength,
for(;;){
labelLen = getNextSeparator(labelStart,remainingLen, nameprep, &delimiter,&done, status);
labelLen = getNextSeparator(labelStart,remainingLen, &delimiter,&done);
labelReqLength = _internal_toUnicode(labelStart, labelLen,
currentDest, remainingDestCapacity,

View file

@ -99,7 +99,7 @@ compareEntries(const UHashTok p1, const UHashTok p2) {
U_CDECL_END
U_CFUNC void
usprep_init(UErrorCode *status) {
usprep_init() {
umtx_init(&usprepMutex);
}
@ -304,11 +304,8 @@ usprep_open(const char* path,
if(status == NULL || U_FAILURE(*status)){
return NULL;
}
usprep_init(status);
if (U_FAILURE(*status)) {
return NULL;
}
/* initialize the mutex */
usprep_init();
/* initialize the profile struct members */
return usprep_getProfile(path,name,status);;
@ -385,11 +382,12 @@ usprep_internal_flushCache(UBool noRefCount){
return deletedNum;
}
/* Works just like ucnv_flushCache() */
/* Works just like ucnv_flushCache()
static int32_t
usprep_flushCache(){
return usprep_internal_flushCache(FALSE);
}
*/
U_CFUNC UBool
usprep_cleanup(void){
@ -500,7 +498,7 @@ usprep_map( const UStringPrepProfile* profile,
UStringPrepType type;
int16_t value;
UBool isIndex;
int32_t* indexes = (int32_t*)profile->indexes;
const int32_t* indexes = profile->indexes;
// no error checking the caller check for error and arguments
// no string length check the caller finds out the string length
@ -660,7 +658,6 @@ usprep_prepare( const UStringPrepProfile* profile,
UCharDirection direction=U_CHAR_DIRECTION_COUNT, firstCharDir=U_CHAR_DIRECTION_COUNT;
UBool leftToRight=FALSE, rightToLeft=FALSE;
int32_t rtlPos =-1, ltrPos =-1;
const int32_t *indexes = profile->indexes;
//get the string length
if(srcLength == -1){

View file

@ -444,7 +444,7 @@ parseUCARules(char *tag, uint32_t startline, UErrorCode *status)
{
c = ucbuf_getc(ucbuf, status);
if(c == QUOTE) {
quoted = !quoted;
quoted = (UBool)!quoted;
}
/* weiv (06/26/2002): adding the following:
* - preserving spaces in commands [...]

View file

@ -80,7 +80,7 @@ getText(const UChar* source, int32_t srcLen,
UnicodeString stringArray[MAX_SPLIT_STRINGS];
RegexPattern *pattern = RegexPattern::compile("@", 0, *status);
UnicodeString src = source;
UnicodeString src (source,srcLen);
if (U_FAILURE(*status)) {
return 0;
@ -115,7 +115,7 @@ getDescription( const UChar* source, int32_t srcLen,
UnicodeString stringArray[MAX_SPLIT_STRINGS];
RegexPattern *pattern = RegexPattern::compile("@", UREGEX_MULTILINE, *status);
UnicodeString src = source;
UnicodeString src(source, srcLen);
if (U_FAILURE(*status)) {
return 0;
@ -139,7 +139,7 @@ getCount(const UChar* source, int32_t srcLen,
UnicodeString stringArray[MAX_SPLIT_STRINGS];
RegexPattern *pattern = RegexPattern::compile("@", UREGEX_MULTILINE, *status);
UnicodeString src = source;
UnicodeString src (source, srcLen);
if (U_FAILURE(*status)) {
@ -152,7 +152,7 @@ getCount(const UChar* source, int32_t srcLen,
return 0;
}
int32_t count = 0;
for(int32_t i=0; i<MAX_SPLIT_STRINGS; i++){
for(int32_t i=0; i<retLen; i++){
matcher.reset(stringArray[i]);
if(matcher.lookingAt(*status)){
count++;
@ -178,7 +178,7 @@ getAt(const UChar* source, int32_t srcLen,
UnicodeString stringArray[MAX_SPLIT_STRINGS];
RegexPattern *pattern = RegexPattern::compile("@", UREGEX_MULTILINE, *status);
UnicodeString src = source;
UnicodeString src (source, srcLen);
if (U_FAILURE(*status)) {
@ -191,7 +191,7 @@ getAt(const UChar* source, int32_t srcLen,
return 0;
}
int32_t count = 0;
for(int32_t i=0; i<MAX_SPLIT_STRINGS; i++){
for(int32_t i=0; i<retLen; i++){
matcher.reset(stringArray[i]);
if(matcher.lookingAt(*status)){
if(count == index){

View file

@ -124,7 +124,7 @@ static enum ETokenType getStringToken(UCHARBUF* buf,
int len=0;
UBool isFollowingCharEscaped=FALSE;
UBool isNLUnescaped = FALSE;
UChar32 prevC;
UChar32 prevC=0;
/* We are guaranteed on entry that initialChar is not a whitespace
character. If we are at the EOF, or have some other problem, it

View file

@ -64,6 +64,7 @@ void bundle_setlocale(struct SRBRoot *bundle, UChar *locale, UErrorCode *status)
int32_t bundle_addtag(struct SRBRoot *bundle, const char *tag, UErrorCode *status);
/* Various resource types */
struct SResource* res_open(const struct UString* comment, UErrorCode* status);
struct SResTable {
uint32_t fCount;