From 692ac7df1d9ab19712ca1256f4f84cf18d55169c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 28 May 2010 11:57:35 -0700 Subject: Fix compiler warnings about overriding const Change retrieve_data and srcDst to use const. This fixes compiler warnings about violating const rules. --- src/common/unionfs.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/common/unionfs.c b/src/common/unionfs.c index 2f7cd70..2c4f0f4 100644 --- a/src/common/unionfs.c +++ b/src/common/unionfs.c @@ -52,9 +52,6 @@ sys_cp(const char *src_file, const char *dst_file) } } -void -retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op); - void set_path(char *path, boolean config); @@ -151,7 +148,8 @@ get_config_path(GNode *node) * **/ void -retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) +retrieve_data(char* rel_data_path, GNode *node, const char* root, + NODE_OPERATION op) { boolean final_node = FALSE; @@ -159,8 +157,9 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) return; } - char *tmp = root;//get_cdirp(); + const char *tmp = root;//get_cdirp(); char full_data_path[sizeof(char)*MAX_LENGTH_DIR_PATH]; + strcpy(full_data_path,tmp); if (rel_data_path != NULL) { strcat(full_data_path,rel_data_path); @@ -800,8 +799,8 @@ common_commit_copy_to_live_config(GNode *node, boolean suppress_piecewise_copy, //needed for iteration below struct SrcDst { - char *_src; - char *_dst; + const char *_src; + const char *_dst; boolean _test_mode; }; -- cgit v1.2.3