3e34f7b370
- lvm can't pass build with gcc option Wstringop-overflow (bsc#1175565) - remove suse speical patch - bug-1175565_lvm-cant-pass-build-with-gcc-option-Wstringop-overflow.patch - add upstream patch + bug-1175565_01-tools-move-struct-element-before-variable-lenght-lis.patch + bug-1175565_02-gcc-change-zero-sized-array-to-fexlible-array.patch + bug-1175565_03-gcc-zero-sized-array-to-fexlible-array-C99.patch OBS-URL: https://build.opensuse.org/request/show/831895 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=281
57 lines
1.6 KiB
Diff
57 lines
1.6 KiB
Diff
From cc2218b4014015bd2633454e683293851183e08c Mon Sep 17 00:00:00 2001
|
|
From: Zhao Heming <heming.zhao@suse.com>
|
|
Date: Fri, 21 Aug 2020 00:05:04 +0800
|
|
Subject: [PATCH] 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>
|
|
---
|
|
device_mapper/libdm-common.c | 2 +-
|
|
lib/activate/fs.c | 2 +-
|
|
libdm/libdm-common.c | 2 +-
|
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/device_mapper/libdm-common.c b/device_mapper/libdm-common.c
|
|
index b6d08f5..9b87e4e 100644
|
|
--- a/device_mapper/libdm-common.c
|
|
+++ b/device_mapper/libdm-common.c
|
|
@@ -1445,7 +1445,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)
|
|
diff --git a/lib/activate/fs.c b/lib/activate/fs.c
|
|
index b2c99fc..96f7df6 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 466c74b..a288297 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)
|
|
--
|
|
1.8.3.1
|
|
|