From: Paul Eggert Date: Mon, 14 Mar 2011 22:56:24 +0000 (-0700) Subject: * sysdep.c: Fix pointer signedness issue. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~554^2~100 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fbd02d7b061d3adc47ccce6ff568ef4bd3aecf17;p=emacs.git * sysdep.c: Fix pointer signedness issue. --- diff --git a/src/ChangeLog b/src/ChangeLog index 0840e5ec9f0..266ff2f58a6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-14 Paul Eggert * sysdep.c (system_process_attributes): Rename vars to avoid shadowing. + Fix pointer signedness issue. * process.c (serial_open, serial_configure): Move decls from here ... * systty.h: ... to here, so that they can be checked. diff --git a/src/sysdep.c b/src/sysdep.c index b8fbf863074..e19f9ca829e 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2845,8 +2845,10 @@ system_process_attributes (Lisp_Object pid) fd = emacs_open (fn, O_RDONLY, 0); if (fd >= 0) { - for (cmdline_size = 0; emacs_read (fd, &c, 1) == 1; cmdline_size++) + char ch; + for (cmdline_size = 0; emacs_read (fd, &ch, 1) == 1; cmdline_size++) { + c = ch; if (isspace (c) || c == '\\') cmdline_size++; /* for later quoting, see below */ }