qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] bug with io/channel-socket.c - variable-sized object may no


From: Programmingkid
Subject: [Qemu-devel] bug with io/channel-socket.c - variable-sized object may not be initialized
Date: Wed, 13 Jan 2016 16:19:45 -0500

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. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]