acpi_wakeup - Mark used vars with attribute used
authorAlex Hornung <ahornung@gmail.com>
Thu, 3 Sep 2009 07:57:34 +0000 (08:57 +0100)
committerAlex Hornung <ahornung@gmail.com>
Thu, 3 Sep 2009 09:49:01 +0000 (10:49 +0100)
* Mark obscurely used variables (such as variables only used from inside
  inline assembly) with __attribute__((used)).
  This also solves an issue with llvm/clang.

sys/platform/pc32/acpica5/acpi_wakeup.c
sys/platform/pc64/acpica5/acpi_wakeup.c

index f83138e..c6a39ac 100644 (file)
 extern uint32_t        acpi_reset_video;
 extern void    initializecpu(void);
 
-static struct region_descriptor        r_idt, r_gdt, *p_gdt;
-static uint16_t                r_ldt;
+static __attribute__((used)) struct region_descriptor  r_idt, r_gdt, *p_gdt;
+static __attribute__((used)) uint16_t  r_ldt;
 
-static uint32_t                r_eax, r_ebx, r_ecx, r_edx, r_ebp, r_esi, r_edi,
-                       r_efl, r_cr0, r_cr2, r_cr3, r_cr4, ret_addr;
+static __attribute__((used)) uint32_t  r_eax, r_ebx, r_ecx, r_edx, r_ebp,
+                                       r_esi, r_edi, r_efl, r_cr0, r_cr2,
+                                       r_cr3, r_cr4, ret_addr;
 
-static uint16_t                r_cs, r_ds, r_es, r_fs, r_gs, r_ss, r_tr;
-static uint32_t                r_esp;
+static __attribute__((used)) uint16_t  r_cs, r_ds, r_es, r_fs, r_gs, r_ss,
+                                       r_tr;
+static __attribute__((used)) uint32_t  r_esp;
 
 static void            acpi_printcpu(void);
 static void            acpi_realmodeinst(void *arg, bus_dma_segment_t *segs,
index 3e75242..67254ee 100644 (file)
 
 extern uint32_t        acpi_reset_video;
 
-static struct region_descriptor        r_idt, r_gdt, *p_gdt;
-static uint16_t                r_ldt;
+static __attribute__((used)) struct region_descriptor  r_idt, r_gdt, *p_gdt;
+static __attribute__((used)) uint16_t  r_ldt;
 
-static uint32_t                r_eax, r_ebx, r_ecx, r_edx, r_ebp, r_esi, r_edi,
-                       r_efl, r_cr0, r_cr2, r_cr3, r_cr4, ret_addr;
+static __attribute__((used)) uint32_t  r_eax, r_ebx, r_ecx, r_edx, r_ebp,
+                                       r_esi, r_edi, r_efl, r_cr0, r_cr2,
+                                       r_cr3, r_cr4, ret_addr;
 
-static uint16_t                r_cs, r_ds, r_es, r_fs, r_gs, r_ss, r_tr;
-static uint32_t                r_esp;
+static __attribute__((used)) uint16_t  r_cs, r_ds, r_es, r_fs, r_gs,
+                                       r_ss, r_tr;
+static __attribute__((used)) uint32_t  r_esp;
 
 static void            acpi_printcpu(void);
 static void            acpi_realmodeinst(void *arg, bus_dma_segment_t *segs,