Use [] instead of [0] in structures.
authorIlari Liusvaara <[email protected]>
Sat, 18 Aug 2007 14:14:03 +0000 (18 17:14 +0300)
committerIlari Liusvaara <[email protected]>
Sat, 18 Aug 2007 14:14:03 +0000 (18 17:14 +0300)
Zero-length arrays are GCC extension. Use the standard C99 construct
instead.

context.c
message.c
object.c

index 795ad3b..69e3fe2 100644 (file)
--- a/context.c
+++ b/context.c
@@ -32,7 +32,7 @@ struct context
        /* Context lock. */
        struct lock c_lock;
        /* Locals. */
-       struct object* c_locals[0];
+       struct object* c_locals[];
 };
 
 /*****************************************************************************/
index 07be7e1..ae9ee36 100644 (file)
--- a/message.c
+++ b/message.c
@@ -11,7 +11,7 @@ struct message
        /* Number of parameters in message. */
        size_t m_parameter_count;
        /* Parameters contained. */
-       struct object* m_parameters[0];
+       struct object* m_parameters[];
 };
 
 /* Message queue node. */
index ad0a7eb..05ac6e0 100644 (file)
--- a/object.c
+++ b/object.c
@@ -11,7 +11,7 @@ struct object
        /* Special receiver. */
        void (*o_special)(struct context* ctx, struct message* msg);
        /* Fields. */
-       struct object* o_fields[0];
+       struct object* o_fields[];
 };