iso9660: Fix GCC 11 'array subscript partly outside array bounds' warning
This commit is contained in:
parent
1e7ba95230
commit
659a6afa18
@ -5,7 +5,7 @@ set -x
|
|||||||
|
|
||||||
TARGET=i386-elf
|
TARGET=i386-elf
|
||||||
BINUTILSVERSION=2.36.1
|
BINUTILSVERSION=2.36.1
|
||||||
GCCVERSION=10.2.0
|
GCCVERSION=11-20210228
|
||||||
NASMVERSION=2.15.05
|
NASMVERSION=2.15.05
|
||||||
GZIPVERSION=1.10
|
GZIPVERSION=1.10
|
||||||
|
|
||||||
@ -19,8 +19,8 @@ export PATH="$PREFIX/bin:$PATH"
|
|||||||
if [ ! -f binutils-$BINUTILSVERSION.tar.gz ]; then
|
if [ ! -f binutils-$BINUTILSVERSION.tar.gz ]; then
|
||||||
wget https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILSVERSION.tar.gz
|
wget https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILSVERSION.tar.gz
|
||||||
fi
|
fi
|
||||||
if [ ! -f gcc-$GCCVERSION.tar.gz ]; then
|
if [ ! -f gcc-$GCCVERSION.tar.xz ]; then
|
||||||
wget https://ftp.gnu.org/gnu/gcc/gcc-$GCCVERSION/gcc-$GCCVERSION.tar.gz
|
wget https://ftp.nluug.nl/languages/gcc/snapshots/$GCCVERSION/gcc-$GCCVERSION.tar.xz
|
||||||
fi
|
fi
|
||||||
if [ ! -f nasm-$NASMVERSION.tar.gz ]; then
|
if [ ! -f nasm-$NASMVERSION.tar.gz ]; then
|
||||||
wget https://www.nasm.us/pub/nasm/releasebuilds/$NASMVERSION/nasm-$NASMVERSION.tar.gz
|
wget https://www.nasm.us/pub/nasm/releasebuilds/$NASMVERSION/nasm-$NASMVERSION.tar.gz
|
||||||
@ -34,7 +34,7 @@ mkdir build
|
|||||||
cd build
|
cd build
|
||||||
|
|
||||||
tar -xf ../binutils-$BINUTILSVERSION.tar.gz
|
tar -xf ../binutils-$BINUTILSVERSION.tar.gz
|
||||||
tar -xf ../gcc-$GCCVERSION.tar.gz
|
tar -xf ../gcc-$GCCVERSION.tar.xz
|
||||||
tar -xf ../nasm-$NASMVERSION.tar.gz
|
tar -xf ../nasm-$NASMVERSION.tar.gz
|
||||||
tar -xf ../gzip-$GZIPVERSION.tar.gz
|
tar -xf ../gzip-$GZIPVERSION.tar.gz
|
||||||
|
|
||||||
|
@ -39,31 +39,34 @@ struct iso9660_volume_descriptor {
|
|||||||
uint8_t type;
|
uint8_t type;
|
||||||
char identifier[5];
|
char identifier[5];
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
uint8_t data[2041];
|
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct iso9660_primary_volume {
|
struct iso9660_primary_volume {
|
||||||
uint8_t type;
|
struct iso9660_volume_descriptor;
|
||||||
char standard_identifier[5];
|
|
||||||
uint8_t version;
|
|
||||||
uint8_t unused0[1];
|
|
||||||
char system_identifier[32];
|
|
||||||
char volume_identifier[32];
|
|
||||||
uint8_t unused1[8];
|
|
||||||
struct BE32_t space_size;
|
|
||||||
uint8_t unused2[32];
|
|
||||||
struct BE16_t set_size;
|
|
||||||
struct BE16_t volume_seq;
|
|
||||||
struct BE16_t LBA_size;
|
|
||||||
struct BE32_t path_table_size;
|
|
||||||
|
|
||||||
uint32_t LBA_path_table_little;
|
union {
|
||||||
uint32_t LBA_optional_path_table_little;
|
struct {
|
||||||
uint32_t LBA_path_table_big;
|
uint8_t unused0[1];
|
||||||
uint32_t LBA_optional_path_table_big;
|
char system_identifier[32];
|
||||||
|
char volume_identifier[32];
|
||||||
|
uint8_t unused1[8];
|
||||||
|
struct BE32_t space_size;
|
||||||
|
uint8_t unused2[32];
|
||||||
|
struct BE16_t set_size;
|
||||||
|
struct BE16_t volume_seq;
|
||||||
|
struct BE16_t LBA_size;
|
||||||
|
struct BE32_t path_table_size;
|
||||||
|
|
||||||
struct iso9660_directory_entry root;
|
uint32_t LBA_path_table_little;
|
||||||
uint8_t no_one_cares[1858];
|
uint32_t LBA_optional_path_table_little;
|
||||||
|
uint32_t LBA_path_table_big;
|
||||||
|
uint32_t LBA_optional_path_table_big;
|
||||||
|
|
||||||
|
struct iso9660_directory_entry root;
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
uint8_t padding[2041];
|
||||||
|
};
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user