From d335dc3def8568d7b2518d4c037cdce89da4ee29 Mon Sep 17 00:00:00 2001 From: Balbir Singh Date: Wed, 17 Dec 2008 15:22:26 +0000 Subject: libcgroup Test: suppress-string-constant-warnings-in-compilation The following patch removes the string to char * conversion warnings. Signed-off-by: Sudhir Kumar git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@276 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- tests/libcgrouptest.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/libcgrouptest.h') diff --git a/tests/libcgrouptest.h b/tests/libcgrouptest.h index 983d9be..1e5295d 100644 --- a/tests/libcgrouptest.h +++ b/tests/libcgrouptest.h @@ -79,10 +79,11 @@ char extra[SIZE] = "\n"; /* Functions to test each API */ void test_cgroup_init(int retcode, int i); void test_cgroup_attach_task(int retcode, struct cgroup *cgroup1, - char *group1, char *group2, int fs_info, int k, int i); + const char *group1, const char *group2, + int fs_info, int k, int i); /* API test functions end here */ -void get_controllers(char *name, int *exist); +void get_controllers(const char *name, int *exist); static int group_exist(char *path_group); static int set_controller(int controller, char *controller_name, char *control_file); @@ -94,9 +95,10 @@ struct cgroup *new_cgroup(char *group, char *controller_name, int check_fsmounted(int multimnt); static int check_task(char *tasksfile); /* function to print messages in better format */ -static inline void message(int num, int pass, char *api, int ret, char *extra); +static inline void message(int num, int pass, const char *api, + int ret, char *extra); static inline void build_path(char *target, char *mountpoint, - char *group, char *file); + const char *group, const char *file); /* Allocate memory and populate info messages */ void set_info_msgs(); -- cgit