diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-08-22 09:27:18 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-08-22 09:27:18 +0000 |
commit | 56e4c419a5f0c51803b6864c16a60f345590f9fe (patch) | |
tree | f96f451817c1c4bac0cb3b96341e2cd2cc7551e4 /Build/source | |
parent | 48e47d6646bcaada8035afd79fd9c7335336e4c8 (diff) |
TeX & Co: Avoid compiler warnings (Windows only)
git-svn-id: svn://tug.org/texlive/trunk@35009 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 5d214df244e..1ba4c893545 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,6 +1,10 @@ +2014-08-22 Peter Breitenlohner <peb@mppmu.mpg.de> + + * texmfmp.c: Avoid several compiler warnings (Windows only). + 2014-08-22 Akira Kakuto <kakuto@fuk.kinidai.ac.jp> - * texmfmp.c: Support multibyte filenames in pipe (Windows only) + * texmfmp.c: Support multibyte filenames in pipe (Windows only). 2014-07-23 Akira Kakuto <kakuto@fuk.kinidai.ac.jp> diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index 0ff76b8a05c..48feb65ddf9 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -490,6 +490,8 @@ shell_cmd_is_allowed (const char *cmd, char **safecmd, char **cmdname) #ifdef WIN32 #undef system #define system fsyscp_system + +#if ENABLE_PIPES static int is_include_space(const char *s) { char *p; @@ -505,18 +507,18 @@ static FILE *wbinpopen(const char *cmd, const char *mode) assert(cmd && mode); if (is_include_space (cmd)) { FILE *ret; - const char *cmd2; - char *p, *q; + const char *p; + char *cmd2, *q; cmd2 = xmalloc (strlen (cmd) + 3); - q = (char *)cmd2; - p = (char *)cmd; + q = cmd2; + p = cmd; *q++= '\"'; while(*p) *q++ = *p++; *q++ = '\"'; *q = '\0'; ret = fsyscp_popen (cmd2, mode); - free ((char *)cmd2); + free (cmd2); return ret; } else { return fsyscp_popen (cmd, mode); @@ -525,6 +527,7 @@ static FILE *wbinpopen(const char *cmd, const char *mode) #undef popen #define popen wbinpopen #endif +#endif /* ENABLE_PIPES */ int runsystem (const char *cmd) |