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/gdt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'i686/gdt.h') diff --git a/i686/gdt.h b/i686/gdt.h index 9148c3d..f00ff7f 100644 --- a/i686/gdt.h +++ b/i686/gdt.h @@ -14,9 +14,9 @@ struct __attribute__((packed)) Access { enum Ring privilege : 2; // descriptor privilege level bool present : 1; // true for every active segment }; -_Static_assert(sizeof(struct Access) == 1); +_Static_assert(sizeof(struct Access) == 1, "access byte size"); -static const struct Access null_access = {}; +static const struct Access null_access = {false, false, false, false, false, false, false}; static const struct Access ktext_access = {.readwrite = true, .executable = true, .segment = true, .present = true}; static const struct Access kdata_access = {.readwrite = true, .segment = true, .present = true}; @@ -43,7 +43,7 @@ struct __attribute__((packed)) SegmentDescriptor_t { bool granularity : 1; // limit scaled by 4k when set uint8_t base_31_24; // high bits of segment address }; -_Static_assert(sizeof(struct SegmentDescriptor_t) == 8); +_Static_assert(sizeof(struct SegmentDescriptor_t) == 8, "segment descriptor size"); void SegmentDescriptor(struct SegmentDescriptor_t *self, unsigned base, unsigned limit, uint8_t access); -- cgit v1.2.1