diff options
author | Brian C. Lane <bcl@redhat.com> | 2020-11-10 15:42:46 -0800 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2020-11-20 14:00:58 -0800 |
commit | b7ccc1b29674937ab4c97d0e1b7b5bfd6f366b92 (patch) | |
tree | 8d7f1cb6ae343a193a609d69667c85f09c7766e3 | |
parent | 09fb0fc6dadde9982d243567cf92743149895102 (diff) | |
download | parted-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.
-rw-r--r-- | libparted/fs/hfs/hfs.h | 2 | ||||
-rw-r--r-- | libparted/fs/r/hfs/hfs.h | 2 |
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; |