[kaffe] CVS kaffe (dalibor): Fixed compiler warning on sparc-solaris
Kaffe CVS
Kaffe Mailing List <kaffe@kaffe.org>
Tue Jan 6 12:39:01 2004
PatchSet 4282
Date: 2004/01/06 20:36:03
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Fixed compiler warning on sparc-solaris
2004-01-06 Dalibor Topic <robilad@kaffe.org>
* kaffe/kaffevm/jar.c
(collectJarFile) Don't define rc if NDEBUG is defined.
Fixes a compiler warning on sparc-solaris.
Reported by: Riccardo Mottola <zuse@libero.it>
Members:
ChangeLog:1.1869->1.1870
kaffe/kaffevm/jar.c:1.24->1.25
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1869 kaffe/ChangeLog:1.1870
--- kaffe/ChangeLog:1.1869 Tue Jan 6 20:23:15 2004
+++ kaffe/ChangeLog Tue Jan 6 20:36:03 2004
@@ -1,5 +1,13 @@
2004-01-06 Dalibor Topic <robilad@kaffe.org>
+ * kaffe/kaffevm/jar.c
+ (collectJarFile) Don't define rc if NDEBUG is defined.
+ Fixes a compiler warning on sparc-solaris.
+
+ Reported by: Riccardo Mottola <zuse@libero.it>
+
+2004-01-06 Dalibor Topic <robilad@kaffe.org>
+
* libraries/clib/awt/X/evt.c
(eventStr) Don't define if NDEBUG is defined.
Fixes a compiler warning on sparc-solaris.
Index: kaffe/kaffe/kaffevm/jar.c
diff -u kaffe/kaffe/kaffevm/jar.c:1.24 kaffe/kaffe/kaffevm/jar.c:1.25
--- kaffe/kaffe/kaffevm/jar.c:1.24 Tue Jul 8 07:33:49 2003
+++ kaffe/kaffe/kaffevm/jar.c Tue Jan 6 20:36:04 2004
@@ -170,7 +170,11 @@
#ifdef HAVE_MMAP
if( jf->data != MAP_FAILED )
{
- int rc = munmap(jf->data, jf->size);
+#if !defined(NDEBUG)
+ /* Only define rc for use in assert */
+ int rc =
+#endif /* defined(NDEBUG) */
+ munmap(jf->data, jf->size);
assert(rc == 0);
}