Browse Source

解决编译器警告

fslongjin 2 years ago
parent
commit
0dc12cb1ca
2 changed files with 3 additions and 3 deletions
  1. 1 1
      kernel/common/bitree.c
  2. 2 2
      kernel/driver/multiboot2/multiboot2.h

+ 1 - 1
kernel/common/bitree.c

@@ -53,7 +53,7 @@ struct bt_node_t *bt_create_node(struct bt_node_t *left, struct bt_node_t *right
 
     return node;
 nomem:;
-    return -ENOMEM;
+    return (void*)-ENOMEM;
 }
 /**
  * @brief 插入结点

+ 2 - 2
kernel/driver/multiboot2/multiboot2.h

@@ -294,7 +294,7 @@ struct multiboot_tag_framebuffer_info_t
 // indexed color
 struct multiboot_tag_framebuffer_info_type0_t
 {
-    struct multiboot_tag_framebuffer_info_t;
+    struct multiboot_tag_framebuffer_info_t header;
     uint32_t framebuffer_palette_num_colors;
     struct multiboot_color_t color_desc;
 };
@@ -302,7 +302,7 @@ struct multiboot_tag_framebuffer_info_type0_t
 // direct RGB color
 struct multiboot_tag_framebuffer_info_type1_t
 {
-    struct multiboot_tag_framebuffer_info_t;
+    struct multiboot_tag_framebuffer_info_t header;
 
     uint8_t framebuffer_red_field_position;
     uint8_t framebuffer_red_mask_size;