[c99] change gcc zero-length array to C99 flexible array declaration

2005-11-26 Paul Jakma <paul.jakma@sun.com>

	* buffer.c: (struct buffer_data) change gcc zero array
	  declaration to C99 incomplete array.
	* stream.h: (struct stream) same
	* ospf_api.c: (struct opaque_lsa) same
This commit is contained in:
paul 2005-11-26 09:21:43 +00:00
parent 89368d9f8b
commit 00c290e02e
5 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2005-11-26 Paul Jakma <paul.jakma@sun.com>
* buffer.c: (struct buffer_data) change gcc zero array
declaration to C99 incomplete array.
* stream.h: (struct stream) same
2005-11-24 Paul Jakma <paul.jakma@sun.com> 2005-11-24 Paul Jakma <paul.jakma@sun.com>
* privs.c: (zcaps2sys/solaris) remove unused variable. * privs.c: (zcaps2sys/solaris) remove unused variable.

View File

@ -53,7 +53,7 @@ struct buffer_data
size_t sp; size_t sp;
/* Actual data stream (variable length). */ /* Actual data stream (variable length). */
unsigned char data[0]; /* real dimension is buffer->size */ unsigned char data[]; /* real dimension is buffer->size */
}; };
/* It should always be true that: 0 <= sp <= cp <= size */ /* It should always be true that: 0 <= sp <= cp <= size */

View File

@ -103,7 +103,7 @@ struct stream
size_t getp; /* next get position */ size_t getp; /* next get position */
size_t endp; /* last valid data position */ size_t endp; /* last valid data position */
size_t size; /* size of data segment */ size_t size; /* size of data segment */
unsigned char data[0]; /* data pointer */ unsigned char data[]; /* data pointer */
}; };
/* First in first out queue structure. */ /* First in first out queue structure. */

View File

@ -1,3 +1,8 @@
2005-11-26 Paul Jakma <paul.jakma@sun.com>
* ospf_api.c: (struct opaque_lsa) change from gcc zero-length
array to C99 incomplete type array.
2005-11-20 Paul Jakma <paul.jakma@sun.com> 2005-11-20 Paul Jakma <paul.jakma@sun.com>
* ospfd.h: remove the OSPF_ROUTER_ID_UPDATE_DELAY define * ospfd.h: remove the OSPF_ROUTER_ID_UPDATE_DELAY define

View File

@ -68,7 +68,7 @@ api_opaque_lsa_print (struct lsa_header *data)
struct opaque_lsa struct opaque_lsa
{ {
struct lsa_header header; struct lsa_header header;
u_char mydata[0]; u_char mydata[];
}; };
struct opaque_lsa *olsa; struct opaque_lsa *olsa;