[kaffe] CVS kaffe (dalibor): Fixed Utf8Const data padding warning

Kaffe CVS cvs-commits at kaffe.org
Thu Mar 25 02:41:10 PST 2004


PatchSet 4578 
Date: 2004/03/25 09:57:56
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed Utf8Const data padding warning

2004-03-25  Dalibor Topic <robilad at kaffe.org>

        * kaffe/kaffevm/gtypes.h:
        Allocate sizeof(int32) bytes for the data part of a
        Utf8String to avoid warning about padding the struct.

Members: 
	ChangeLog:1.2156->1.2157 
	kaffe/kaffevm/gtypes.h:1.10->1.11 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2156 kaffe/ChangeLog:1.2157
--- kaffe/ChangeLog:1.2156	Wed Mar 24 22:54:50 2004
+++ kaffe/ChangeLog	Thu Mar 25 09:57:56 2004
@@ -1,3 +1,9 @@
+2004-03-25  Dalibor Topic <robilad at kaffe.org>
+
+	* kaffe/kaffevm/gtypes.h:
+	Allocate sizeof(int32) bytes for the data part of a
+	Utf8String to avoid warning about padding the struct.
+
 2004-03-24  Dalibor Topic <robilad at kaffe.org>
 
 	* kaffe/kaffevm/support.c,
Index: kaffe/kaffe/kaffevm/gtypes.h
diff -u kaffe/kaffe/kaffevm/gtypes.h:1.10 kaffe/kaffe/kaffevm/gtypes.h:1.11
--- kaffe/kaffe/kaffevm/gtypes.h:1.10	Mon Mar  8 21:21:08 2004
+++ kaffe/kaffe/kaffevm/gtypes.h	Thu Mar 25 09:57:58 2004
@@ -138,7 +138,7 @@
 	int32		hash;		/* Hash code (== String.hashCode()) */
 	int32		nrefs;		/* Number of references */
 	int32		length;
-	const char	data[1];	/* In UTF-8 format, with final '\0' */
+	const char	data[sizeof(int32)];	/* In UTF-8 format, with final '\0' */
 };
 
 #define	SHIFT_jchar		1




More information about the kaffe mailing list