]> git.sur5r.net Git - cc65/commitdiff
Make the SIZEOF_XXX constants resolve to unsigned values.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 30 Aug 2009 08:36:56 +0000 (08:36 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 30 Aug 2009 08:36:56 +0000 (08:36 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4087 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/datatype.h

index f9dd78313dddd5a3a1180c01b86f834ce3c38cfe..8f72fa105e98371aa10c4da5a61c096b91aa2079 100644 (file)
@@ -165,14 +165,14 @@ struct Type {
 #define FLEXIBLE        0L      /* Flexible array struct member */
 
 /* Sizes. Floating point sizes come from fp.h */
-#define SIZEOF_CHAR     1
-#define SIZEOF_SHORT    2
-#define SIZEOF_INT      2
-#define SIZEOF_LONG     4
-#define SIZEOF_LONGLONG 8
+#define SIZEOF_CHAR     1U
+#define SIZEOF_SHORT    2U
+#define SIZEOF_INT      2U
+#define SIZEOF_LONG     4U
+#define SIZEOF_LONGLONG 8U
 #define SIZEOF_FLOAT    (FP_F_Size())
 #define SIZEOF_DOUBLE   (FP_D_Size())
-#define SIZEOF_PTR      2
+#define SIZEOF_PTR      SIZEOF_INT
 
 /* Bit sizes */
 #define CHAR_BITS       (8 * SIZEOF_CHAR)