浏览代码

修正一些编译器警告

longjin 2 年之前
父节点
当前提交
173c988d5d
共有 5 个文件被更改,包括 11 次插入10 次删除
  1. 1 1
      kernel/arch/x86_64/asm/cmpxchg.h
  2. 1 1
      kernel/common/hid.h
  3. 2 1
      kernel/process/process.h
  4. 0 6
      kernel/sched/cfs.h
  5. 7 1
      kernel/sched/sched.h

+ 1 - 1
kernel/arch/x86_64/asm/cmpxchg.h

@@ -78,4 +78,4 @@ extern void __cmpxchg_wrong_size(void) __compiletime_error("Bad argument size fo
     })
 
 #define arch_try_cmpxchg(ptr, old_ptr, new_ptr) \
-    __raw_try_cmpxchg((ptr), (old_ptr), (new_ptr), sizeof(*ptr))
+    __raw_try_cmpxchg((ptr), (old_ptr), (new_ptr), sizeof(*ptr))

+ 1 - 1
kernel/common/hid.h

@@ -77,7 +77,7 @@ struct hid_parser
     int usage_max;
 
     int cnt_objects; // report descriptor中的对象数目
-    int cnt_report   // report desc中的report数目
+    int cnt_report;   // report desc中的report数目
 };
 
 

+ 2 - 1
kernel/process/process.h

@@ -44,7 +44,8 @@
 		.next_pcb = &proc,                \
 		.parent_pcb = &proc,              \
 		.exit_code = 0,                   \
-		.wait_child_proc_exit = 0         \
+		.wait_child_proc_exit = 0,        \
+		.worker_private = NULL			  \
 	}
 
 /**

+ 0 - 6
kernel/sched/cfs.h

@@ -37,9 +37,3 @@ struct process_control_block *sched_cfs_dequeue();
  *
  */
 void sched_cfs_init();
-
-/**
- * @brief 当时钟中断到达时,更新时间片
- *
- */
-void sched_update_jiffies();

+ 7 - 1
kernel/sched/sched.h

@@ -15,4 +15,10 @@ void sched_enqueue(struct process_control_block *pcb);
 void sched();
 
 
-void sched_init();
+void sched_init();
+
+/**
+ * @brief 当时钟中断到达时,更新时间片
+ *
+ */
+void sched_update_jiffies();