From: Programmingkid <programmingkidx@gmail.com>
To: qemu-devel qemu-devel <qemu-devel@nongnu.org>
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 [thread overview]
Message-ID: <AABBEB04-CD75-48FB-AD9E-2CC2FA2ADCA2@gmail.com> (raw)
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.
next reply other threads:[~2016-01-13 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 21:19 Programmingkid [this message]
2016-01-15 23:56 ` [Qemu-devel] bug with io/channel-socket.c - variable-sized object may not be initialized Eric Blake
2016-01-16 18:54 ` Programmingkid
2016-01-18 9:54 ` Daniel P. Berrange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AABBEB04-CD75-48FB-AD9E-2CC2FA2ADCA2@gmail.com \
--to=programmingkidx@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).