ICU-4288 Fix some compiler warnings.

X-SVN-Rev: 16926
This commit is contained in:
George Rhoten 2004-12-07 23:43:48 +00:00
parent 306b5ea7da
commit ac893ce00e
10 changed files with 25 additions and 21 deletions

View File

@ -243,12 +243,12 @@ public:
* Override of superclass method. This adjusts the result based
* on the coverage rule for this factory.
*/
void updateVisibleIDs(Hashtable& result, UErrorCode& status) const;
virtual void updateVisibleIDs(Hashtable& result, UErrorCode& status) const;
/**
* Return a localized name for the locale represented by id.
*/
UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const;
virtual UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const;
protected:
/**
@ -261,7 +261,7 @@ protected:
* Return true if this id is one the factory supports (visible or
* otherwise).
*/
virtual UBool isSupportedID(const UnicodeString& id, UErrorCode& status) const;
virtual UBool isSupportedID(const UnicodeString& id, UErrorCode& status) const;
/**
* Return the set of ids that this factory supports (visible or
@ -319,13 +319,13 @@ class U_COMMON_API SimpleLocaleKeyFactory : public LocaleKeyFactory {
/**
* Override of superclass method. Returns the service object if kind/locale match. Service is not used.
*/
UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const;
virtual UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const;
/**
* Override of superclass method. This adjusts the result based
* on the coverage rule for this factory.
*/
void updateVisibleIDs(Hashtable& result, UErrorCode& status) const;
virtual void updateVisibleIDs(Hashtable& result, UErrorCode& status) const;
protected:
/**

View File

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 2001-2003, International Business Machines Corporation and *
* Copyright (C) 2001-2004, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -10,7 +10,7 @@
#if !UCONFIG_NO_SERVICE
#include "icunotif.h"
#if DEBUG
#ifdef NOTIFIER_DEBUG
#include <stdio.h>
#endif
@ -58,7 +58,7 @@ ICUNotifier::addListener(const EventListener* l, UErrorCode& status)
listeners->addElement((void*)l, status); // cast away const
} else {
#if DEBUG
#ifdef NOTIFIER_DEBUG
fprintf(stderr, "Listener invalid for this notifier.");
exit(1);
#endif

View File

@ -203,7 +203,7 @@ public:
*/
/**
* <p>ICUServiceFactories generate the service objects maintained by the
* <p>An implementing ICUServiceFactory generates the service objects maintained by the
* service. A factory generates a service object from a key,
* updates id->factory mappings, and returns the display name for
* a supported id.</p>
@ -310,7 +310,7 @@ class U_COMMON_API SimpleFactory : public ICUServiceFactory {
* @param status the error code status.
* @return the service object, or NULL if the factory does not support the key.
*/
UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const;
virtual UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const;
/**
* <p>This implementation adds a mapping from ID -> this to result if visible is TRUE,
@ -319,7 +319,7 @@ class U_COMMON_API SimpleFactory : public ICUServiceFactory {
* @param result the mapping table to update.
* @param status the error code status.
*/
void updateVisibleIDs(Hashtable& result, UErrorCode& status) const;
virtual void updateVisibleIDs(Hashtable& result, UErrorCode& status) const;
/**
* <p>This implementation returns the factory ID if it equals id and visible is TRUE,
@ -331,9 +331,9 @@ class U_COMMON_API SimpleFactory : public ICUServiceFactory {
* @param result output parameter to hold the display name.
* @return result.
*/
UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const;
virtual UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const;
public:
public:
/**
* UObject RTTI boilerplate.
*/

View File

@ -712,7 +712,7 @@ changeState_2022(UConverter* _this,
UCNV_TableStates_2022 value;
UConverterDataISO2022* myData2022 = ((UConverterDataISO2022*)_this->extraInfo);
uint32_t key = myData2022->key;
int32_t offset;
int32_t offset = 0;
char c;
value = VALID_NON_TERMINAL_2022;
@ -1297,7 +1297,7 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args
int32_t len, outLen;
int8_t choices[10];
int32_t choiceCount;
uint32_t targetValue;
uint32_t targetValue = 0;
UBool useFallback;
int32_t i;
@ -2382,7 +2382,7 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args
int32_t len;
int8_t choices[3];
int32_t choiceCount;
uint32_t targetValue;
uint32_t targetValue = 0;
UBool useFallback;
/* set up the state */

View File

@ -2146,7 +2146,7 @@ _getStringOrCopyKey(const char *path, const char *locale,
UChar *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
const UChar *s = NULL;
int32_t length;
int32_t length = 0;
if(itemKey==NULL) {
/* top-level item: normal resource bundle access */

View File

@ -46,7 +46,7 @@
* or mutexes.
* @internal
*/
#if UMTX_STRONG_MEMORY_MODEL
#if defined(UMTX_STRONG_MEMORY_MODEL) && UMTX_STRONG_MEMORY_MODEL
#define UMTX_CHECK(pMutex, expression, result) \
(result)=(expression);

View File

@ -134,7 +134,7 @@ class U_I18N_API EscapeTransliterator : public Transliterator {
/**
* Implements {@link Transliterator#handleTransliterate}.
*/
void handleTransliterate(Replaceable& text, UTransPosition& offset,
virtual void handleTransliterate(Replaceable& text, UTransPosition& offset,
UBool isIncremental) const;
private:

View File

@ -8,6 +8,9 @@
**********************************************************************
*/
#ifndef FUNCREPL_H
#define FUNCREPL_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_TRANSLITERATION
@ -118,5 +121,6 @@ class U_I18N_API FunctionReplacer : public UnicodeFunctor, public UnicodeReplace
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_TRANSLITERATION */
#endif
//eof

View File

@ -83,7 +83,7 @@ class U_I18N_API NormalizationTransliterator : public Transliterator {
* @param incremental if true, assume more text may be coming after
* pos.contextLimit. Otherwise, assume the text is complete.
*/
void handleTransliterate(Replaceable& text, UTransPosition& offset,
virtual void handleTransliterate(Replaceable& text, UTransPosition& offset,
UBool isIncremental) const;
public:

View File

@ -102,7 +102,7 @@ class U_I18N_API UnescapeTransliterator : public Transliterator {
* @param incremental if true, assume more text may be coming after
* pos.contextLimit. Otherwise, assume the text is complete.
*/
void handleTransliterate(Replaceable& text, UTransPosition& offset,
virtual void handleTransliterate(Replaceable& text, UTransPosition& offset,
UBool isIncremental) const;
private: