grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/3] Fix GCC 12 build error


From: Michael Chang
Subject: [PATCH v2 0/3] Fix GCC 12 build error
Date: Mon, 28 Mar 2022 15:00:51 +0800

The tested gcc version is:

 abuild@mazu:~> gcc --version
 gcc (SUSE Linux) 12.0.1 20220307 (experimental) [revision 
40c1d4a07e5798c01e4364336c9617550744861d]
 Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Although it may not catch all build errors as there are quite many
combinations of cpu architecture and platform which grub supports. The
work is as far as I can get right now and I'd like to have them reviewed
before anyone running into similar problems.

v2:
Fix -Werror=array-bounds array subscript 0 is outside array bounds
1. Replace null with NULL in commit message
2. Add explain to do variable shuffling in commit message
3. Change macro grub_absolute_pointer definition to include/grub/types.h
4. Use grub_addr_t as pointer type in grub_absolute_pointer
5. Use asm keyword instead of __asm__
6. Mention RELOC_HIDE() macro in the comment of grub_absolute_pointer

Thanks,
Michael

Michael Chang (3):
  mkimage: Fix dangling pointer may be used error
  Fix -Werror=array-bounds array subscript 0 is outside array bounds
  reed_solomon: Fix array subscript 0 is outside array bounds

 grub-core/bus/cs5536.c                |  4 ++--
 grub-core/commands/acpi.c             |  4 ++--
 grub-core/commands/efi/loadbios.c     |  9 +++++----
 grub-core/commands/i386/pc/drivemap.c |  8 +++++---
 grub-core/commands/i386/pc/sendkey.c  | 12 ++++++------
 grub-core/disk/i386/pc/biosdisk.c     |  4 ++--
 grub-core/fs/cbfs.c                   |  2 +-
 grub-core/kern/i386/pc/acpi.c         |  4 ++--
 grub-core/kern/i386/pc/mmap.c         |  2 +-
 grub-core/lib/reed_solomon.c          |  9 +++++++++
 grub-core/loader/i386/multiboot_mbi.c |  2 +-
 grub-core/loader/multiboot_mbi2.c     |  4 ++--
 grub-core/mmap/i386/pc/mmap.c         | 26 +++++++++++++-------------
 grub-core/net/drivers/i386/pc/pxe.c   | 12 ++++++------
 grub-core/term/i386/pc/console.c      |  5 ++---
 grub-core/term/i386/pc/vga_text.c     |  6 +++---
 grub-core/term/ns8250.c               |  7 ++++++-
 grub-core/video/i386/pc/vbe.c         |  6 +++---
 include/grub/types.h                  | 24 ++++++++++++++++++++++++
 util/mkimage.c                        | 21 +++++++++++++++++++++
 20 files changed, 116 insertions(+), 55 deletions(-)

-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]