summaryrefslogtreecommitdiff
path: root/libparted
diff options
context:
space:
mode:
authorBrian C. Lane <bcl@redhat.com>2020-11-10 15:42:46 -0800
committerBrian C. Lane <bcl@redhat.com>2020-11-20 14:00:58 -0800
commitb7ccc1b29674937ab4c97d0e1b7b5bfd6f366b92 (patch)
tree8d7f1cb6ae343a193a609d69667c85f09c7766e3 /libparted
parent09fb0fc6dadde9982d243567cf92743149895102 (diff)
downloadparted-b7ccc1b29674937ab4c97d0e1b7b5bfd6f366b92.tar.gz
hfs: Fix gcc 10 bounds check warning
binfo is actually a list of structs that cannot be known until runtime, so use a variable length array.
Diffstat (limited to 'libparted')
-rw-r--r--libparted/fs/hfs/hfs.h2
-rw-r--r--libparted/fs/r/hfs/hfs.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libparted/fs/hfs/hfs.h b/libparted/fs/hfs/hfs.h
index 4fa2e95..0a9392a 100644
--- a/libparted/fs/hfs/hfs.h
+++ b/libparted/fs/hfs/hfs.h
@@ -529,7 +529,7 @@ struct __attribute__ ((packed)) _HfsJBlockListHeader {
uint32_t bytes_used;
uint32_t checksum;
uint32_t pad;
- HfsJBlockInfo binfo[1];
+ HfsJBlockInfo binfo[];
};
typedef struct _HfsJBlockListHeader HfsJBlockListHeader;
diff --git a/libparted/fs/r/hfs/hfs.h b/libparted/fs/r/hfs/hfs.h
index 4fa2e95..0a9392a 100644
--- a/libparted/fs/r/hfs/hfs.h
+++ b/libparted/fs/r/hfs/hfs.h
@@ -529,7 +529,7 @@ struct __attribute__ ((packed)) _HfsJBlockListHeader {
uint32_t bytes_used;
uint32_t checksum;
uint32_t pad;
- HfsJBlockInfo binfo[1];
+ HfsJBlockInfo binfo[];
};
typedef struct _HfsJBlockListHeader HfsJBlockListHeader;