Mercurial > emacs
changeset 75220:1b003fe28dfe
(Fdelete_process, Fprocess_id, sigchld_handler): Copy PID into EMACS_INT
to avoid GCC warnings.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 13 Jan 2007 21:57:35 +0000 |
parents | 8f98728fbb1f |
children | 17b5adc4c635 |
files | src/process.c |
diffstat | 1 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/process.c Sat Jan 13 21:47:31 2007 +0000 +++ b/src/process.c Sat Jan 13 21:57:35 2007 +0000 @@ -815,9 +815,12 @@ { #ifdef SIGCHLD Lisp_Object symbol; + /* Assignment to EMACS_INT stops GCC whining about limited range + of data type. */ + EMACS_INT pid = p->pid;; /* No problem storing the pid here, as it is still in Vprocess_alist. */ - deleted_pid_list = Fcons (make_fixnum_or_float (p->pid), + deleted_pid_list = Fcons (make_fixnum_or_float (pid), /* GC treated elements set to nil. */ Fdelq (Qnil, deleted_pid_list)); /* If the process has already signaled, remove it from the list. */ @@ -827,7 +830,7 @@ if (CONSP (p->status)) symbol = XCAR (p->status); if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) - Fdelete (make_fixnum_or_float (p->pid), deleted_pid_list); + Fdelete (make_fixnum_or_float (pid), deleted_pid_list); else #endif { @@ -912,10 +915,13 @@ (process) register Lisp_Object process; { + /* Assignment to EMACS_INT stops GCC whining about limited range of + data type. */ + EMACS_INT pid; + CHECK_PROCESS (process); - return (XPROCESS (process)->pid - ? make_fixnum_or_float (XPROCESS (process)->pid) - : Qnil); + pid = XPROCESS (process)->pid; + return (pid ? make_fixnum_or_float (pid) : Qnil); } DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0, @@ -6405,7 +6411,7 @@ while (1) { - register int pid; + register EMACS_INT pid; WAITTYPE w; Lisp_Object tail;