This commit is contained in:
tianshaoshuai 2024-09-05 17:01:16 +08:00 committed by openkylin-cibot
parent 90d63344d8
commit 9bdd4dc6c9
2 changed files with 84 additions and 0 deletions

83
debian/patches/0034-111.patch vendored Normal file
View File

@ -0,0 +1,83 @@
From: tianshaoshuai <tianshaoshuai@kylinos.cn>
Date: Thu, 5 Sep 2024 17:01:16 +0800
Subject: 111
---
src/hardware/test/kybluetooth-test.c | 4 ++--
src/hardware/test/kyhw-test.c | 2 +-
src/packages/libkypackages.c | 6 +++---
src/proc/libkyprocess.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/hardware/test/kybluetooth-test.c b/src/hardware/test/kybluetooth-test.c
index 57b994e..66f6099 100644
--- a/src/hardware/test/kybluetooth-test.c
+++ b/src/hardware/test/kybluetooth-test.c
@@ -136,8 +136,8 @@ int main()
kdk_bluetooth_free_major_class(major);
}
- free(id[i]);
+ free((int*)id[i]);
}while(id[i]);
- free(id);
+ free((int**)id);
return 0;
}
diff --git a/src/hardware/test/kyhw-test.c b/src/hardware/test/kyhw-test.c
index a5e1e1d..01dd60f 100644
--- a/src/hardware/test/kyhw-test.c
+++ b/src/hardware/test/kyhw-test.c
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <string.h>
-static _print_hw(struct HWInfo *hw)
+static void _print_hw(struct HWInfo *hw)
{
struct HWInfo *tmp = hw;
while (tmp)
diff --git a/src/packages/libkypackages.c b/src/packages/libkypackages.c
index acf0318..9575012 100644
--- a/src/packages/libkypackages.c
+++ b/src/packages/libkypackages.c
@@ -203,7 +203,7 @@ static int get_desktop_info(char *dir_path, kdk_startmenu_list *programlist)
static char *read_default_app(const char *filetype)
{
char *homeDir = getenv("HOME");
- char *filepath[PROGRAM_SIZE] = {0};
+ char filepath[PROGRAM_SIZE] = {0};
sprintf(filepath, "%s/.config/mimeapps.list", homeDir);
FILE *fp = fopen(filepath, "r");
char line[1024], *val = NULL;
@@ -526,7 +526,7 @@ char **kdk_package_get_code_path(const char *name)
int kdk_package_get_file_count(const char *name)
{
if (NULL == name)
- return NULL;
+ return 0;
int result = 0;
char cmd[128];
@@ -560,7 +560,7 @@ int kdk_package_is_removable(const char *name)
int kdk_package_verify_disk_space(const char *path)
{
if (NULL == path)
- return NULL;
+ return 0;
int result = 0;
diff --git a/src/proc/libkyprocess.c b/src/proc/libkyprocess.c
index 099ba3f..f551b2f 100644
--- a/src/proc/libkyprocess.c
+++ b/src/proc/libkyprocess.c
@@ -2151,7 +2151,7 @@ int get_process_info(process_info *info, unsigned int *proc_num)
sscanf(drd->d_name, "%ld", &(proc_info->proc_pid));
get_proc_name(proc_info->proc_pid, proc_info->proc_name);
- get_proc_state(proc_info->proc_pid, &(proc_info->proc_state));
+ get_proc_state(proc_info->proc_pid, proc_info->proc_state);
get_proc_command(proc_info->proc_pid, proc_info->proc_command);

View File

@ -31,3 +31,4 @@
0031-111.patch
0032-111.patch
0033-111.patch
0034-111.patch