From a709a7b68575139c37ae203d379d2bc93f330dbd Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 4 Sep 2008 14:58:58 -0700 Subject: Fix build warnings Get rid of warnings for push_path discards qualifiers from pointer target type. --- src/cli_new.c | 6 +++--- src/cli_val.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cli_new.c b/src/cli_new.c index 83cc150..0eed12b 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -1776,10 +1776,10 @@ void warrant_path(vtw_path *path, int len) /***************************************************** push_path - extend path by '/' and one new segment *****************************************************/ -void push_path(vtw_path *path, char *segm) +void push_path(vtw_path *path, const char *segm) { int len; - char *cp; + const char *cp; char *pp; for(cp=segm, len=0;*cp;++cp, ++len) @@ -1807,7 +1807,7 @@ void push_path(vtw_path *path, char *segm) if (path->path_lev == path->path_ends_alloc){ path->path_ends_alloc += ENDS_ALLOC; path->path_ends = (int *)my_realloc(path->path_ends, - sizeof(int *)*path->path_ends_alloc, "puhs_path 2"); + sizeof(int *)*path->path_ends_alloc, "push_path 2"); } path->path_ends[path->path_lev++] = path->path_len; // push_path_no_escape(); diff --git a/src/cli_val.h b/src/cli_val.h index 5abaaee..a753c92 100644 --- a/src/cli_val.h +++ b/src/cli_val.h @@ -152,7 +152,7 @@ extern void cli_val_start(char *s); extern void cli_val_done(void); extern void init_path(vtw_path *path, const char *root); extern void pop_path(vtw_path *path); -extern void push_path(vtw_path *path, char *segm); +extern void push_path(vtw_path *path, const char *segm); extern void push_path_no_escape(vtw_path *path, char *segm); extern void free_def(vtw_def *defp); extern void free_sorted(vtw_sorted *sortp); -- cgit v1.2.3