diff options
author | Eli Zaretskii <eliz@gnu.org> | 2007-01-13 21:58:23 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2007-01-13 21:58:23 +0000 |
commit | d30fe7798a37dd32a4ad0aa32289accc3a0f57d8 (patch) | |
tree | ac25c6c2f97f8920c8842a337b5b1acffde6ae8f /src/process.c | |
parent | 9bd1cd35febc3cdb8d244c42fad136c496cafdaf (diff) | |
download | emacs-d30fe7798a37dd32a4ad0aa32289accc3a0f57d8.tar.gz emacs-d30fe7798a37dd32a4ad0aa32289accc3a0f57d8.tar.bz2 emacs-d30fe7798a37dd32a4ad0aa32289accc3a0f57d8.zip |
(Fdelete_process, Fprocess_id, sigchld_handler): Copy PID into EMACS_INT
to avoid GCC warnings.
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c index c2ec6021ad2..9a7f9eea1c1 100644 --- a/src/process.c +++ b/src/process.c @@ -815,9 +815,12 @@ nil, indicating the current buffer's process. */) { #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 @@ nil, indicating the current buffer's process. */) 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 @@ For a network connection, this value is nil. */) (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 @@ sigchld_handler (signo) while (1) { - register int pid; + register EMACS_INT pid; WAITTYPE w; Lisp_Object tail; |