From 509bf85036b3c345f832558a299257effabba108 Mon Sep 17 00:00:00 2001 From: aqua Date: Wed, 2 Nov 2022 23:09:18 +0200 Subject: fix compiler warnings --- i686/sys/control.h | 6 +++--- i686/sys/cpuid.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'i686/sys') diff --git a/i686/sys/control.h b/i686/sys/control.h index 0231236..1b38472 100644 --- a/i686/sys/control.h +++ b/i686/sys/control.h @@ -1,6 +1,6 @@ #pragma once -static void +static inline void abort() { asm volatile(R"(cli @@ -8,13 +8,13 @@ h: hlt jmp h)"); } -static void +static inline void enable_interrupts() { asm volatile("sti"); } -static void +static inline void disable_interrupts() { asm volatile("cli"); diff --git a/i686/sys/cpuid.h b/i686/sys/cpuid.h index f2ffe37..862601f 100644 --- a/i686/sys/cpuid.h +++ b/i686/sys/cpuid.h @@ -12,7 +12,7 @@ struct CPUVersion { unsigned int family_ex : 8; unsigned int __unused_2 : 4; } __attribute__((packed, aligned(__alignof__(unsigned int)))); -_Static_assert(sizeof(struct CPUVersion) == sizeof(unsigned int)); +_Static_assert(sizeof(struct CPUVersion) == sizeof(unsigned int), "cpuid version struct size"); unsigned int family(const struct CPUVersion v) -- cgit v1.2.1