mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 17:24:01 +00:00
ICU-2424 warnings cleanup
X-SVN-Rev: 13862
This commit is contained in:
parent
1c96a4be04
commit
fd0010d370
5 changed files with 12 additions and 30 deletions
|
@ -162,7 +162,7 @@ public:
|
|||
*/
|
||||
UnicodeString toString() const {
|
||||
char tmp[400];
|
||||
sprintf(tmp, "%lf,%lf",
|
||||
sprintf(tmp, "%f,%f",
|
||||
(ascension*RAD_DEG), (declination*RAD_DEG));
|
||||
return UnicodeString(tmp);
|
||||
}
|
||||
|
|
|
@ -364,7 +364,7 @@ int32_t IslamicCalendar::handleGetYearLength(int32_t extendedYear) const {
|
|||
/**
|
||||
* @draft ICU 2.4
|
||||
*/
|
||||
int32_t IslamicCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const {
|
||||
int32_t IslamicCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /* useMonth */) const {
|
||||
return monthStart(eyear, month) + 1948439;
|
||||
}
|
||||
|
||||
|
@ -401,7 +401,7 @@ int32_t IslamicCalendar::handleGetExtendedYear() {
|
|||
* calendar equivalents for the given Julian day.
|
||||
* @draft ICU 2.4
|
||||
*/
|
||||
void IslamicCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) {
|
||||
void IslamicCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/) {
|
||||
int32_t year, month, dayOfMonth, dayOfYear;
|
||||
UDate startDate;
|
||||
int32_t days = julianDay - 1948440;
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include "unicode/calendar.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* <code>IslamicCalendar</code> is a subclass of <code>Calendar</code>
|
||||
* that that implements the Islamic civil and religious calendars. It
|
||||
|
@ -451,6 +453,8 @@ class U_I18N_API IslamicCalendar : public Calendar {
|
|||
static void initializeSystemDefaultCentury(void);
|
||||
};
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -54,8 +54,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(OlsonTimeZone)
|
|||
* Default constructor. Creates a time zone with an empty ID and
|
||||
* a fixed GMT offset of zero.
|
||||
*/
|
||||
OlsonTimeZone::OlsonTimeZone() : finalZone(0), finalYear(INT32_MAX),
|
||||
finalMillis(DBL_MAX) {
|
||||
OlsonTimeZone::OlsonTimeZone() : finalYear(INT32_MAX), finalMillis(DBL_MAX), finalZone(0) {
|
||||
constructEmpty();
|
||||
}
|
||||
|
||||
|
@ -80,7 +79,8 @@ void OlsonTimeZone::constructEmpty() {
|
|||
OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top,
|
||||
const UResourceBundle* res,
|
||||
UErrorCode& ec) :
|
||||
finalZone(0), finalYear(INT32_MAX), finalMillis(DBL_MAX) {
|
||||
finalYear(INT32_MAX), finalMillis(DBL_MAX), finalZone(0)
|
||||
{
|
||||
U_DEBUG_TZ_MSG(("OlsonTimeZone(%s)\n", ures_getKey((UResourceBundle*)res)));
|
||||
if ((top == NULL || res == NULL) && U_SUCCESS(ec)) {
|
||||
ec = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
|
|
|
@ -174,11 +174,8 @@ static UBool getOlsonMeta() {
|
|||
|
||||
static int32_t findInStringArray(UResourceBundle* array, const UnicodeString& id, UErrorCode &status)
|
||||
{
|
||||
#if 1
|
||||
UResourceBundle *n = NULL;
|
||||
UnicodeString copy = id;
|
||||
const UChar* buf = copy.getTerminatedBuffer();
|
||||
int32_t myLen = copy.length();
|
||||
const UChar* u = NULL;
|
||||
|
||||
int32_t count = ures_getSize(array);
|
||||
|
@ -212,24 +209,6 @@ static int32_t findInStringArray(UResourceBundle* array, const UnicodeString& id
|
|||
}
|
||||
U_DEBUG_TZ_MSG(("fisa: not found\n"));
|
||||
return -1;
|
||||
|
||||
#else
|
||||
// Linear search
|
||||
if(U_FAILURE(status)) return -1;
|
||||
int32_t idx=0;
|
||||
UnicodeString check;
|
||||
const char *key;
|
||||
while(U_SUCCESS(status)) {
|
||||
check = ures_getNextUnicodeString(array, &key, &status);
|
||||
if(check==id) {
|
||||
U_DEBUG_TZ_MSG(("fisa: %d\n", idx));
|
||||
return idx;
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
U_DEBUG_TZ_MSG(("fisa: -1\n"));
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -297,8 +276,7 @@ static UResourceBundle* openOlsonResource(const UnicodeString& id,
|
|||
#endif
|
||||
UResourceBundle *top = ures_openDirect(0, kZONEINFO, &ec);
|
||||
U_DEBUG_TZ_MSG(("pre: res sz=%d\n", ures_getSize(&res)));
|
||||
UResourceBundle *newRes = getZoneByName(top, id, &res, ec);
|
||||
U_DEBUG_TZ_MSG(("NewRes=%p, &res=%p\n", newRes, &res));
|
||||
/* &res = */ getZoneByName(top, id, &res, ec);
|
||||
// Dereference if this is an alias. Docs say result should be 1
|
||||
// but it is 0 in 2.8 (?).
|
||||
U_DEBUG_TZ_MSG(("Loading zone '%s' (%s, size %d) - %s\n", buf, ures_getKey((UResourceBundle*)&res), ures_getSize(&res), u_errorName(ec)));
|
||||
|
@ -782,7 +760,7 @@ public:
|
|||
ures_close(top);
|
||||
}
|
||||
|
||||
TZEnumeration(const TZEnumeration &other) : map(NULL), len(0), pos(0) {
|
||||
TZEnumeration(const TZEnumeration &other) : StringEnumeration(), map(NULL), len(0), pos(0) {
|
||||
if(other.len > 0) {
|
||||
if(other.map != NULL) {
|
||||
map = (int32_t *)uprv_malloc(other.len * sizeof(int32_t));
|
||||
|
|
Loading…
Add table
Reference in a new issue