mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 23:10:40 +00:00
ICU-6799 fix compiler warnings
X-SVN-Rev: 25668
This commit is contained in:
parent
f4c7601d73
commit
cc9ed5eb45
5 changed files with 14 additions and 16 deletions
|
@ -11,7 +11,7 @@
|
|||
U_NAMESPACE_BEGIN
|
||||
|
||||
char* ByteSink::GetAppendBuffer(int32_t min_capacity,
|
||||
int32_t desired_capacity_hint,
|
||||
int32_t /*desired_capacity_hint*/,
|
||||
char* scratch, int32_t scratch_capacity,
|
||||
int32_t* result_capacity) {
|
||||
if (min_capacity < 1 || scratch_capacity < min_capacity) {
|
||||
|
@ -44,7 +44,7 @@ void CheckedArrayByteSink::Append(const char* bytes, int32_t n) {
|
|||
}
|
||||
|
||||
char* CheckedArrayByteSink::GetAppendBuffer(int32_t min_capacity,
|
||||
int32_t desired_capacity_hint,
|
||||
int32_t /*desired_capacity_hint*/,
|
||||
char* scratch,
|
||||
int32_t scratch_capacity,
|
||||
int32_t* result_capacity) {
|
||||
|
|
|
@ -773,22 +773,21 @@ typedef struct DefaultTZInfo {
|
|||
* It is currently use to compare two TZ files.
|
||||
*/
|
||||
static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFileName, DefaultTZInfo* tzInfo) {
|
||||
if (tzInfo->defaultTZFilePtr == NULL) {
|
||||
tzInfo->defaultTZFilePtr = fopen(defaultTZFileName, "r");
|
||||
}
|
||||
FILE* file = fopen(TZFileName, "r");
|
||||
|
||||
FILE* file;
|
||||
int64_t sizeFile;
|
||||
int64_t sizeFileLeft;
|
||||
int32_t sizeFileRead;
|
||||
int32_t sizeFileToRead;
|
||||
char bufferFile[MAX_READ_SIZE];
|
||||
UBool result = TRUE;
|
||||
|
||||
if (tzInfo->defaultTZFilePtr == NULL) {
|
||||
tzInfo->defaultTZFilePtr = fopen(defaultTZFileName, "r");
|
||||
}
|
||||
file = fopen(TZFileName, "r");
|
||||
|
||||
tzInfo->defaultTZPosition = 0; /* reset position to begin search */
|
||||
|
||||
char bufferFile[MAX_READ_SIZE];
|
||||
|
||||
UBool result = TRUE;
|
||||
|
||||
if (file != NULL && tzInfo->defaultTZFilePtr != NULL) {
|
||||
/* First check that the file size are equal. */
|
||||
if (tzInfo->defaultTZFileSize == 0) {
|
||||
|
@ -1854,7 +1853,7 @@ u_versionFromUString(UVersionInfo versionArray, const UChar *versionString) {
|
|||
U_CAPI int32_t U_EXPORT2
|
||||
u_compareVersions(UVersionInfo v1, UVersionInfo v2) {
|
||||
int n;
|
||||
if(v1==NULL||v2==NULL) return NULL;
|
||||
if(v1==NULL||v2==NULL) return 0;
|
||||
for(n=0;n<U_MAX_VERSION_LENGTH;n++) {
|
||||
if(v1[n]<v2[n]) {
|
||||
return -1;
|
||||
|
|
|
@ -78,7 +78,7 @@ U_CAPI void U_EXPORT2 ulist_addItemEndList(UList *list, const void *data, UBool
|
|||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
}
|
||||
newItem->data = data;
|
||||
newItem->data = (void *)(data);
|
||||
newItem->forceDelete = forceDelete;
|
||||
|
||||
if (list->size == 0) {
|
||||
|
@ -105,7 +105,7 @@ U_CAPI void U_EXPORT2 ulist_addItemBeginList(UList *list, const void *data, UBoo
|
|||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
}
|
||||
newItem->data = data;
|
||||
newItem->data = (void *)(data);
|
||||
newItem->forceDelete = forceDelete;
|
||||
|
||||
if (list->size == 0) {
|
||||
|
|
|
@ -616,7 +616,6 @@ int32_t destSize,uint32_t options) {
|
|||
|
||||
int lamAlefOption = 0;
|
||||
int tashkeelOption = 0;
|
||||
int step = -1;
|
||||
|
||||
destSize = sourceLength;
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ usprep_openByType(UStringPrepProfileType type,
|
|||
return NULL;
|
||||
}
|
||||
int32_t index = (int32_t)type;
|
||||
if (index < 0 || index >= sizeof(PROFILE_NAMES)/sizeof(PROFILE_NAMES[0])) {
|
||||
if (index < 0 || index >= (int32_t)(sizeof(PROFILE_NAMES)/sizeof(PROFILE_NAMES[0]))) {
|
||||
*status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue