From 17c28196185544eb5ac41db39dcf02104ebf3ff2 Mon Sep 17 00:00:00 2001 From: Jdhggg <24016020834@stu.nsu.edu.cn> Date: Tue, 18 Mar 2025 15:43:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复init_sq_list函数无意义传参数 --- Project2/Debug/Project2.log | 7 ++++--- .../Debug/Project2.tlog/CL.command.1.tlog | Bin 2190 -> 2190 bytes Project2/Debug/Project2.tlog/CL.read.1.tlog | Bin 11038 -> 10262 bytes Project2/Debug/Project2.tlog/CL.write.1.tlog | Bin 2346 -> 2036 bytes sq_list.c | 4 ++-- sq_list.h | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Project2/Debug/Project2.log b/Project2/Debug/Project2.log index 8bbefbd..c2e2e7b 100644 --- a/Project2/Debug/Project2.log +++ b/Project2/Debug/Project2.log @@ -1,4 +1,5 @@ - linked_list.c -C:\code\lencode\Project2\linked_list.c(31,24): warning C4028: 形参 1 与声明不同 -C:\code\lencode\Project2\linked_list.c(59,2): warning C4047: “return”:“address_node *”与“int”的间接级别不同 + main.c + sq_list.c + 正在生成代码... +C:\code\lencode\Project2\sq_list.c(10,1): warning C4716: “init_sq_list”: 必须返回一个值 Project2.vcxproj -> C:\code\lencode\Project2\Debug\Project2.exe diff --git a/Project2/Debug/Project2.tlog/CL.command.1.tlog b/Project2/Debug/Project2.tlog/CL.command.1.tlog index cc68b3cdcaa2f2cc629605e2ac5999e87a872c58..9ca4aac48986ba7ddbb4b63363ce9a305b2317ae 100644 GIT binary patch delta 33 pcmeAZ>=T?|Ho1U9Zu1Y;X-t!sv6@WY$0V>>g1Lfe^FF2*OaRQ?3-AB{ delta 27 gcmeAZ>=T?|wpot3fOYaKCX>l$nB+FGRWN~Q0D~k6F#rGn diff --git a/Project2/Debug/Project2.tlog/CL.read.1.tlog b/Project2/Debug/Project2.tlog/CL.read.1.tlog index ab688c70c63c3519a271c0c409a51bf3ddac298c..863682e7a0137125932b20ecb90673b054bf5ffa 100644 GIT binary patch delta 60 zcmbOiHZ5R++2#rIecY4R@S99D6Px@-t!eWvMJdk72RLdbajtdAQ2L|hLt diff --git a/Project2/Debug/Project2.tlog/CL.write.1.tlog b/Project2/Debug/Project2.tlog/CL.write.1.tlog index 026ce36fd251afa3a71d95318d2a60100cff6bf3..8b924eea908e1e2e412ef0887ed87d313ddca6ea 100644 GIT binary patch delta 49 zcmZ1_^o4(d+2nKVQkw;sPBCph#~#BtS&GeM@+}sg%>hhLV4Ska%UDb%`?1vk0Kxwe AZU6uP delta 56 zcmeyuze;F=+2nIOGb Hj$s4 #include "sq_list.h" -sq_list* init_sq_list(sq_list *name) +sq_list* init_sq_list(void) { - name = (sq_list*)malloc(sizeof(sq_list)); + sq_list* name = (sq_list*)malloc(sizeof(sq_list)); memset(name, 0, sizeof(sq_list)); } diff --git a/sq_list.h b/sq_list.h index db0c95d..33c9e1c 100644 --- a/sq_list.h +++ b/sq_list.h @@ -9,7 +9,7 @@ typedef struct sq_list } sq_list; // ʼ -sq_list* init_sq_list(sq_list* list); +sq_list *init_sq_list(void); // ɾ void delete_sq_list(sq_list* list, int pos);