Modern compilers aer 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 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 <[email protected]>
---
 include/grub/i386/pc/int.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/grub/i386/pc/int.h b/include/grub/i386/pc/int.h
index a60104001..ee13195d3 100644
--- a/include/grub/i386/pc/int.h
+++ b/include/grub/i386/pc/int.h
@@ -22,11 +22,11 @@
 #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
 
-- 
2.53.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to