From: Olaf Hering <olaf@aepfle.de>
To: Tim Deegan <tim@xen.org>
Cc: xen-devel@lists.xenproject.org,
'Ian Jackson' <ian.jackson@eu.citrix.com>, 'Wei Liu' <wl@xen.org>,
paul@xen.org
Subject: Re: [PATCH v1] kdd: remove zero-length arrays
Date: Tue, 9 Jun 2020 15:22:33 +0200 [thread overview]
Message-ID: <20200609152233.039cfc86.olaf@aepfle.de> (raw)
In-Reply-To: <20200609121549.GA90841@deinos.phlegethon.org>
[-- Attachment #1: Type: text/plain, Size: 951 bytes --]
Am Tue, 9 Jun 2020 13:15:49 +0100
schrieb Tim Deegan <tim@xen.org>:
> Olaf, can you try dropping the 'payload' field from the header and replacing the payload[0] in pkt with payload[] ?
In file included from kdd.c:53:
kdd.h:325:17: error: flexible array member in union
325 | uint8_t payload[];
--- orig/kdd.h 2020-06-08 17:40:05.000000000 +0000
+++ kdd.h 2020-06-09 13:20:36.724887538 +0000
@@ -68,7 +68,6 @@
uint16_t len; /* Payload length, excl. header and trailing byte */
uint32_t id; /* Echoed in responses */
uint32_t sum; /* Unsigned sum of all payload bytes */
- uint8_t payload[0];
} PACKED kdd_hdr;
#define KDD_PKT_CMD 0x0002 /* Debugger commands (and replies to them) */
@@ -323,7 +322,7 @@
kdd_msg msg;
kdd_reg reg;
kdd_stc stc;
- uint8_t payload[0];
+ uint8_t payload[];
};
} PACKED kdd_pkt;
Olaf
[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-06-09 13:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 20:38 [PATCH v1] kdd: remove zero-length arrays Olaf Hering
2020-06-09 8:55 ` Paul Durrant
2020-06-09 9:00 ` Olaf Hering
2020-06-09 9:04 ` Paul Durrant
2020-06-09 9:06 ` Jürgen Groß
2020-06-09 9:08 ` Paul Durrant
2020-06-09 9:37 ` Olaf Hering
2020-06-09 12:15 ` Tim Deegan
2020-06-09 13:22 ` Olaf Hering [this message]
2020-06-09 13:26 ` Ian Jackson
2020-06-09 13:32 ` Olaf Hering
2020-06-10 19:16 ` Tim Deegan
2020-06-11 19:10 ` Olaf Hering
2020-06-16 20:50 ` Christopher Clark
2020-06-17 8:21 ` Paul Durrant
2020-06-26 10:26 ` Wei Liu
2020-06-26 10:31 ` Paul Durrant
2020-06-26 10:33 ` Wei Liu
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=20200609152233.039cfc86.olaf@aepfle.de \
--to=olaf@aepfle.de \
--cc=ian.jackson@eu.citrix.com \
--cc=paul@xen.org \
--cc=tim@xen.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.