From f38b7b2f6d342709e704522a93e2bafb009b2678 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 2 Feb 2011 23:48:16 +0200 Subject: Silence a couple of compiler warnings --- soltools/javadep/javadep.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'soltools') diff --git a/soltools/javadep/javadep.c b/soltools/javadep/javadep.c index afc7600e1864..86032c7f7cc9 100644 --- a/soltools/javadep/javadep.c +++ b/soltools/javadep/javadep.c @@ -119,7 +119,7 @@ static char *pout_file = NULL; uint8 read_uint8(const file_t *pfile); uint16 read_uint16(const file_t *pfile); uint32 read_uint32(const file_t *pfile); -void skip_bytes(const file_t *pfile, const size_t nnum); +void skip_bytes(const file_t *pfile, const long nnum); char *escape_slash(const char *pstr); int is_inner(const char *pstr); void print_dependencies(const struct growable *pdep, @@ -152,7 +152,7 @@ uint8 read_uint8(const file_t *pfile) { /* read a byte from classfile */ - int nread; + size_t nread; uint8 ndata; nread = fread(&ndata, sizeof(uint8), 1, pfile->pfs); if ( !nread ) { @@ -166,7 +166,7 @@ uint16 read_uint16(const file_t *pfile) { /* read a short from classfile and convert it to host format */ - int nread; + size_t nread; uint16 ndata; nread = fread(&ndata, sizeof(uint16), 1, pfile->pfs); if ( !nread ) { @@ -181,7 +181,7 @@ uint32 read_uint32(const file_t *pfile) { /* read an int from classfile and convert it to host format */ - int nread; + size_t nread; uint32 ndata; nread = fread(&ndata, sizeof(uint32), 1, pfile->pfs); if ( !nread ) { @@ -203,7 +203,7 @@ read_utf8(const file_t *pfile) */ utf8_t a_utf8; - int nread; + size_t nread; a_utf8.pdata = NULL; @@ -255,7 +255,7 @@ char *utf8tolatin1(const utf8_t a_utf8) void -skip_bytes(const file_t *pfile, const size_t nnumber) +skip_bytes(const file_t *pfile, const long nnumber) { /* skip a nnumber of bytes in classfile */ if ( fseek(pfile->pfs, nnumber, SEEK_CUR) == -1 ) @@ -270,7 +270,7 @@ add_to_dependencies(struct growable *pdep, { /* create dependencies */ int i; - int nlen_filt, nlen_str, nlen_pdepstr; + size_t nlen_filt, nlen_str, nlen_pdepstr; char *pstr, *ptrunc; char path[PATH_MAX+1]; char cnp_class_file[PATH_MAX+1]; @@ -345,7 +345,7 @@ escape_slash(const char *pstr) const char *pp = pstr; char *p, *pnp; char *pnew_str; - int nlen_pnp, nlen_pp; + size_t nlen_pnp, nlen_pp; int i = 0; while ( (p=strchr(pp, cpathsep)) != NULL ) { @@ -454,7 +454,7 @@ process_class_file(const char *pfilename, const struct growable *pfilt) ncnt = read_uint16(&file); #ifdef DEBUG - printf("Magic: %p\n", (void*)nmagic); + printf("Magic: %x\n", nmagic); printf("Major %d, Minor %d\n", nmajor, nminor); printf("Const_pool_count %d\n", ncnt); #else @@ -709,7 +709,8 @@ void create_filters(struct growable *pfilt, const struct growable *pinc) { char *p, *pp, *pstr; - int i, nlen, nlen_pstr; + int i; + size_t nlen, nlen_pstr; /* break up includes into filter list */ for ( i = 0; i < pinc->ncur; i++ ) { pp = pinc->parray[i]; -- cgit