qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] bug with io/channel-socket.c - variable-sized object may not be initialized
@ 2016-01-13 21:19 Programmingkid
  2016-01-15 23:56 ` Eric Blake
  0 siblings, 1 reply; 4+ messages in thread
From: Programmingkid @ 2016-01-13 21:19 UTC (permalink / raw)
  To: qemu-devel qemu-devel

This code causes an error to occur during compiling: 

char control[CMSG_SPACE(sizeof(int) * SOCKET_MAX_FDS)] = { 0 };

It is located at line 496 in io/channel-socket.c. 

Here is the full error message:
io/channel-socket.c: In function 'qio_channel_socket_writev':
io/channel-socket.c:496:18: error: variable-sized object may not be initialized
     char control[CMSG_SPACE(sizeof(int) * SOCKET_MAX_FDS)] = { 0 };

This is from gcc 4.9 running on Mac OS 10.6.8. 

A quick fix to this problem is to replace everything in the parentheses with 1000. 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-18  9:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-13 21:19 [Qemu-devel] bug with io/channel-socket.c - variable-sized object may not be initialized Programmingkid
2016-01-15 23:56 ` Eric Blake
2016-01-16 18:54   ` Programmingkid
2016-01-18  9:54   ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).