about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-12-19 14:44:50 -0200
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-12-19 15:52:12 -0200
commite184ac3a105a4a45b920bf2cdaa701a683c781a2 (patch)
treef76067e8eb8e479c701a253454556f9d529c6d2d /posix
parentd711a00f93fa964f41a53839228598fbf1a6b482 (diff)
downloadglibc-e184ac3a105a4a45b920bf2cdaa701a683c781a2.tar.gz
glibc-e184ac3a105a4a45b920bf2cdaa701a683c781a2.tar.xz
glibc-e184ac3a105a4a45b920bf2cdaa701a683c781a2.zip
glob: Silence warning about void pointer arithmetic
Sync with gnulib 0e14f025d2.

Checked on x86_64-linux-gnu.

	* lib/glob.c (glob): Use a 'char *', not a 'void *', in pointer
	arithmetic.

Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'posix')
-rw-r--r--posix/glob.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/posix/glob.c b/posix/glob.c
index 511ec4bbc0..85571963aa 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -641,7 +641,8 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
 		    {
 # if defined HAVE_GETPWNAM_R || defined _LIBC
 		      size_t ssize = strlen (s.data) + 1;
-		      err = getpwnam_r (s.data, &pwbuf, s.data + ssize,
+		      char *sdata = s.data;
+		      err = getpwnam_r (sdata, &pwbuf, sdata + ssize,
 					s.length - ssize, &p);
 # else
 		      p = getpwnam (s.data);