ICU-2000 Fixed some compiler warnings.

X-SVN-Rev: 10553
This commit is contained in:
George Rhoten 2002-12-06 23:53:00 +00:00
parent e7b85bac9a
commit 8b5d063db9
13 changed files with 15 additions and 26 deletions

View File

@ -3670,7 +3670,6 @@ inline uint8_t *packFrench(uint8_t *primaries, uint8_t *primEnd, uint8_t *second
uint8_t secondary;
int32_t count2 = 0;
uint32_t i = 0, size = 0;
uint8_t *primStart = primaries;
// we use i here since the key size already accounts for terminators, so we'll discard the increment
addWithIncrement(primaries, primEnd, i, UCOL_LEVELTERMINATOR);
/* If there are any unresolved continuation secondaries, reverse them here so that we can reverse the whole secondary thing */

View File

@ -915,7 +915,6 @@ ucol_uprv_bld_copyRangeFromUCA(UColTokenParser *src, tempUCATable *t,
UErrorCode *status) {
//UChar decomp[256];
uint32_t CE = UCOL_NOT_FOUND;
uint32_t tag = UCOL_NOT_FOUND;
UChar32 u = 0;
UCAElements el;
el.isThai = FALSE;
@ -1072,8 +1071,6 @@ UCATableHeader *ucol_assembleTailoringTable(UColTokenParser *src, UErrorCode *st
}
}
uint32_t CE = UCOL_NOT_FOUND;
UChar u = 0;
UCAElements el;
el.isThai = FALSE;
el.prefixSize = 0;

View File

@ -1505,8 +1505,8 @@ static void TestAttribute()
void TestGetTailoredSet() {
struct {
char *rules;
char *tests[20];
const char *rules;
const char *tests[20];
int32_t testsize;
} setTest[] = {
{ "&a < \\u212b", { "\\u212b", "A\\u030a", "\\u00c5" }, 3},

View File

@ -23,6 +23,7 @@
#include "unicode/ustring.h"
#include "cintltst.h"
#include "ccolltst.h"
#include "cstring.h"
#include "unicode/ures.h"
#ifdef WIN32

View File

@ -101,6 +101,8 @@ const static char* compatTests[][3] = {
};
void addNormTest(TestNode** root);
void addNormTest(TestNode** root)
{
addTest(root, &TestAPI, "tscoll/cnormtst/TestAPI");

View File

@ -44,7 +44,6 @@ addUSetTest(TestNode** root) {
static void Testj2269() {
UErrorCode status = U_ZERO_ERROR;
UChar a[4] = { 0x61, 0x62, 0x63, 0 };
UChar b[4] = { 0x61, 0x62, 0x63, 0 };
USet *s = uset_open(1, 0);
uset_addString(s, a, 3);
a[0] = 0x63; a[1] = 0x63;

View File

@ -698,7 +698,6 @@ static void printOutBundle(FILE *out, UConverter *converter, UResourceBundle *re
}
}
} else { /* we have to use low level access to do this */
uint16_t i = 0;
Resource r = RES_BOGUS;
for(i = 0; i < ures_getSize(resource); i++) {
/* need to know if it's an alias */

View File

@ -1225,13 +1225,8 @@ parseInclude(char *tag, uint32_t startline, UErrorCode *status)
char *filename;
uint32_t line;
UChar *pTarget = NULL;
UChar *target = NULL;
UChar *targetLimit = NULL;
UCHARBUF *ucbuf;
UChar32 c = 0;
uint32_t size = 0;
UBool quoted = FALSE;
char *fullname = NULL;
int32_t count = 0;
const char* cp = NULL;

View File

@ -104,7 +104,6 @@ encodeRunByte(uint16_t* buffer,uint16_t* bufLimit, uint8_t value, int32_t length
*/
static int32_t
encodeRunShort(uint16_t* buffer,uint16_t* bufLimit, uint16_t value, int32_t length,UErrorCode* status) {
uint16_t* saveBuf = buffer;
int32_t num=0;
if (length < 4) {
int j=0;
@ -147,7 +146,6 @@ encodeRunShort(uint16_t* buffer,uint16_t* bufLimit, uint16_t value, int32_t leng
*/
int32_t
usArrayToRLEString(const uint16_t* src,int32_t srcLen,uint16_t* buffer, int32_t bufLen,UErrorCode* status) {
const uint16_t* saveBuf = buffer;
uint16_t* bufLimit = buffer+bufLen;
int32_t num = 0;
if(buffer < bufLimit){

View File

@ -101,7 +101,6 @@ static char* convertAndEscape(char** pDest, int32_t destCap, int32_t* destLength
int32_t i=0;
char* dest=NULL;
char* temp=NULL;
int32_t len=0;
int32_t destLen=0;
if(status==NULL || U_FAILURE(*status) || pDest==NULL || srcLen==0 || src == NULL){
@ -383,7 +382,7 @@ bin_write_xml( struct SResource *res, UErrorCode *status) {
(res->u.fBinaryValue.fFileName !=NULL ?
uprv_strlen(res->u.fBinaryValue.fFileName) :0)));
char* buffer = NULL;
char* ext = NULL;
const char* ext = NULL;
fn[0]=0;
if(res->u.fBinaryValue.fLength>100){
@ -454,7 +453,6 @@ bin_write_xml( struct SResource *res, UErrorCode *status) {
}
static UBool start = TRUE;
static void
table_write_xml(struct SResource *res, UErrorCode *status) {

View File

@ -162,7 +162,8 @@ ucbuf_ungetc(int32_t ungetChar,UCHARBUF* buf);
* @return The input FileStream if its charset was autodetected; NULL otherwise.
*/
U_CAPI FileStream * U_EXPORT2
ucbuf_autodetect(const char* fileName, const char** cp,UConverter** conv, int32_t* signatureLength,UErrorCode* error);
ucbuf_autodetect(const char* fileName, const char** cp,UConverter** conv,
int32_t* signatureLength, UErrorCode* status);
/**
* Autodetects the encoding of the file stream. Only Unicode charsets are autodectected.
@ -181,7 +182,7 @@ ucbuf_autodetect(const char* fileName, const char** cp,UConverter** conv, int32_
*/
U_CAPI UBool U_EXPORT2
ucbuf_autodetect_fs(FileStream* in, const char** cp, UConverter** conv, int32_t* signatureLength, UErrorCode* error);
ucbuf_autodetect_fs(FileStream* in, const char** cp, UConverter** conv, int32_t* signatureLength, UErrorCode* status);
/**
* Returns the approximate size in UChars required for converting the file to UChars

View File

@ -361,9 +361,9 @@ UBool UPerfTest::runTestLoop( char* testname, char* par )
}
*/
if(events == -1){
fprintf(stdout,"= %s end: %f loops: %i operations: %i \n",name , t , loops, testFunction->getOperationsPerIteration());
fprintf(stdout,"= %s end: %f loops: %i operations: %li \n",name , t , loops, testFunction->getOperationsPerIteration());
}else{
fprintf(stdout,"= %s end: %f loops: %i operations: %i events: %i\n",name , t , loops, testFunction->getOperationsPerIteration(), events);
fprintf(stdout,"= %s end: %f loops: %i operations: %li events: %li\n",name , t , loops, testFunction->getOperationsPerIteration(), events);
}
}else{
/*
@ -374,9 +374,9 @@ UBool UPerfTest::runTestLoop( char* testname, char* par )
}
*/
if(events == -1){
fprintf(stdout,"= %s end %f %i %i\n",name , t , loops, testFunction->getOperationsPerIteration());
fprintf(stdout,"= %s end %f %i %li\n",name , t , loops, testFunction->getOperationsPerIteration());
}else{
fprintf(stdout,"= %s end %f %i %i %i\n",name , t , loops, testFunction->getOperationsPerIteration(), events);
fprintf(stdout,"= %s end %f %i %li %li\n",name , t , loops, testFunction->getOperationsPerIteration(), events);
}
}
}

View File

@ -183,7 +183,7 @@ typedef void FuntionToBeTimed(void* param);
struct timeval placeHolder;
};
int32_t uprv_initFrequency(UTimer* timer)
int32_t uprv_initFrequency(UTimer* /*timer*/)
{
return 0;
}
@ -198,7 +198,7 @@ typedef void FuntionToBeTimed(void* param);
t2 = (double)timer2->start.tv_sec + (double)timer2->start.tv_usec/(1000*1000);
return (t2-t1);
}
UBool uprv_compareFrequency(UTimer* timer1, UTimer* timer2){
UBool uprv_compareFrequency(UTimer* /*timer1*/, UTimer* /*timer2*/){
return TRUE;
}