]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
include/grub/i386/pc/int.h: Move GRUB_MACHINE_PCBIOS ifdef
authorNicholas Vinson <nvinson234@gmail.com>
Wed, 4 Mar 2026 02:41:13 +0000 (21:41 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 5 Mar 2026 13:14:56 +0000 (14:14 +0100)
Modern compilers are becoming more strict and starting to warn when
certain attributes are ignored. The regparam attribute is such an
attribute.

Moreover, the function

  void EXPORT_FUNC (grub_bios_interrupt) (grub_uint8_t intno, struct grub_bios_int_registers *regs) __attribute__ ((regparm(3)));

is only defined with the i386-pc target.

Update include/grub/i386/pc/int.h so grub_bios_interrupt() is only
declared when GRUB_MACHINE_PCBIOS is defined. This addresses the issue
of declaring a function that is not defined for non-i386-pc targets and
prevents the "attribute ignored" diagnostic message.

Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
include/grub/i386/pc/int.h

index a6010400198cac12bc5e5842088ca66a9d534e82..ee13195d3a47e02d753a0e6fe13a4f4c0cacfd07 100644 (file)
 #include <grub/symbol.h>
 #include <grub/i386/pc/int_types.h>
 
+#ifdef GRUB_MACHINE_PCBIOS
 void EXPORT_FUNC (grub_bios_interrupt) (grub_uint8_t intno,
                                        struct grub_bios_int_registers *regs)
      __attribute__ ((regparm(3)));
 
-#ifdef GRUB_MACHINE_PCBIOS
 extern struct grub_i386_idt *EXPORT_VAR(grub_realidt);
 #endif