[kaffe] CVS kaffe (dalibor): Fixed warnings regarding argument width
Kaffe CVS
cvs-commits at kaffe.org
Sat Mar 27 09:33:02 PST 2004
PatchSet 4586
Date: 2004/03/27 17:28:16
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Fixed warnings regarding argument width
2003-03-27 Riccardo Mottola <zuse at libero.it>
* kaffe/kaffeh/support.c:
Fixed warnings due to passing arguments of
malloc and read with different width due to prototype
by casting them to proper type.
Members:
ChangeLog:1.2164->1.2165
kaffe/kaffeh/support.c:1.38->1.39
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2164 kaffe/ChangeLog:1.2165
--- kaffe/ChangeLog:1.2164 Sat Mar 27 16:07:29 2004
+++ kaffe/ChangeLog Sat Mar 27 17:28:16 2004
@@ -1,3 +1,10 @@
+2003-03-27 Riccardo Mottola <zuse at libero.it>
+
+ * kaffe/kaffeh/support.c:
+ Fixed warnings due to passing arguments of
+ malloc and read with different width due to prototype
+ by casting them to proper type.
+
2004-03-27 Dalibor Topic <robilad at kaffe.org>
* include/native.h,
Index: kaffe/kaffe/kaffeh/support.c
diff -u kaffe/kaffe/kaffeh/support.c:1.38 kaffe/kaffe/kaffeh/support.c:1.39
--- kaffe/kaffe/kaffeh/support.c:1.38 Sat Mar 27 16:07:32 2004
+++ kaffe/kaffe/kaffeh/support.c Sat Mar 27 17:28:19 2004
@@ -849,7 +849,7 @@
strcpy(superName, start);
}
else {
- strncpy(superName, start, end-start);
+ strncpy(superName, start, (size_t)(end-start));
superName[end-start] = '\0';
}
@@ -873,7 +873,7 @@
continue;
}
- buf = malloc(sbuf.st_size);
+ buf = malloc((size_t) sbuf.st_size);
if (buf == 0)
{
dprintf("kaffeh: Ran out of memory!");
@@ -882,13 +882,13 @@
}
/* XXX this is a bit weak. */
- if (read(fd, buf, sbuf.st_size) != sbuf.st_size) {
+ if (read(fd, buf, (size_t)sbuf.st_size) != sbuf.st_size) {
free(buf);
close(fd);
continue;
}
- classFileInit(&hand, buf, sbuf.st_size, CP_DIR);
+ classFileInit(&hand, buf, (size_t)sbuf.st_size, CP_DIR);
objectDepth++;
/* savepool = constant_pool; */
More information about the kaffe
mailing list