diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2008-03-07 14:06:40 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2008-03-07 14:06:40 +0000 |
commit | 9fd5583d1d3a628142c0386dd733a70f4a91cecb (patch) | |
tree | 43da1d5c5d197b1e186df12bd4df22a969a224c3 | |
parent | b57c890cea8d165ee3b4657bfcaeeac05cbfdb7f (diff) |
avoid const related warnings
git-svn-id: svn://tug.org/texlive/trunk@6876 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/kpsewhich.c | 2 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/progname.c | 2 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/xputenv.c | 6 |
4 files changed, 14 insertions, 5 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index e5eefdb38ed..2ae2111433c 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,12 @@ +2008-03-07 Peter Breitenlohner <peb@mppmu.mpg.de> + + * kpsewhich.c (main): change type of value from string to + const_string, to avoid warning. + * progname.c (selfdir): change type of elt from string to + const_string, to avoid warning. + * xputenv.c: change type of saved_env from const_string to + string, to avoid warning. + 2008-03-06 Peter Breitenlohner <peb@mppmu.mpg.de> * access.c, readlink.c: removed `#include <stdio.h>' preceeding diff --git a/Build/source/texk/kpathsea/kpsewhich.c b/Build/source/texk/kpathsea/kpsewhich.c index 0ff63ab020a..ce48aac14d0 100644 --- a/Build/source/texk/kpathsea/kpsewhich.c +++ b/Build/source/texk/kpathsea/kpsewhich.c @@ -510,7 +510,7 @@ main P2C(int, argc, string *, argv) /* Var to value. */ if (var_to_value) { - string value = kpse_var_value (var_to_value); + const_string value = kpse_var_value (var_to_value); if (!value) { unfound++; value=""; diff --git a/Build/source/texk/kpathsea/progname.c b/Build/source/texk/kpathsea/progname.c index 32e8f01c307..42894ca2c18 100644 --- a/Build/source/texk/kpathsea/progname.c +++ b/Build/source/texk/kpathsea/progname.c @@ -371,7 +371,7 @@ selfdir P1C(const_string, argv0) } CloseLibrary((struct Library *) DOSBase); #else /* not AMIGA */ - string elt; + const_string elt; struct stat s; /* Have to check PATH. But don't call kpse_path_search since we don't diff --git a/Build/source/texk/kpathsea/xputenv.c b/Build/source/texk/kpathsea/xputenv.c index 89adbfc6d5f..722a219ca8f 100644 --- a/Build/source/texk/kpathsea/xputenv.c +++ b/Build/source/texk/kpathsea/xputenv.c @@ -33,8 +33,8 @@ extern int putenv (); * This function can be called many times during a run, and this * allows us to reclaim memory we allocated. */ -static const char **saved_env; -static int saved_count; +static char **saved_env; +static int saved_count; /* * We have different arguments from the "standard" function. A separate @@ -95,7 +95,7 @@ xputenv(const char *var, const char *value) if (cur_loc == saved_count) { /* No old string. */ saved_count++; - saved_env = XRETALLOC(saved_env, saved_count, const char *); + saved_env = XRETALLOC(saved_env, saved_count, char *); } else { /* We owned the old string. */ free(saved_env[cur_loc]); |