From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: stable-2.02 - gcc: change zero-sized array to fexlible array
Date: Fri, 16 Oct 2020 19:10:57 +0000 (GMT) [thread overview]
Message-ID: <20201016191057.5BA3C396EC45@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=87769c5713b9bec9482091bb6d68773a5cc887e6
Commit: 87769c5713b9bec9482091bb6d68773a5cc887e6
Parent: 1ac22fb00b5e95645eabd886967cbcaf4768ff09
Author: Zhao Heming <heming.zhao@suse.com>
AuthorDate: Fri Aug 21 00:05:04 2020 +0800
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Oct 16 16:02:06 2020 +0200
gcc: change zero-sized array to fexlible array
this patch makes gcc happy with compiling option: [-Wstringop-overflow=]
Signed-off-by: Zhao Heming <heming.zhao@suse.com>
---
lib/activate/fs.c | 2 +-
libdm/libdm-common.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/activate/fs.c b/lib/activate/fs.c
index eeb6c11ef..5935391ce 100644
--- a/lib/activate/fs.c
+++ b/lib/activate/fs.c
@@ -313,7 +313,7 @@ struct fs_op_parms {
char *lv_name;
char *dev;
char *old_lv_name;
- char names[0];
+ char names[];
};
static void _store_str(char **pos, char **ptr, const char *str)
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index 906922426..b512efd76 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -1443,7 +1443,7 @@ struct node_op_parms {
char *old_name;
int warn_if_udev_failed;
unsigned rely_on_udev;
- char names[0];
+ char names[];
};
static void _store_str(char **pos, char **ptr, const char *str)
reply other threads:[~2020-10-16 19:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201016191057.5BA3C396EC45@sourceware.org \
--to=zkabelac@sourceware.org \
--cc=lvm-devel@redhat.com \
/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.