diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-11-02 23:09:18 +0200 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-11-02 23:09:18 +0200 |
commit | 509bf85036b3c345f832558a299257effabba108 (patch) | |
tree | 0dda6c4fd5e072410d958b65af90755c5014b514 /i686/gdt.h | |
parent | makefile: make all target the default (diff) | |
download | kernel-509bf85036b3c345f832558a299257effabba108.tar.xz |
fix compiler warnings
Diffstat (limited to 'i686/gdt.h')
-rw-r--r-- | i686/gdt.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |