Commit d30fe779 authored by Eli Zaretskii's avatar Eli Zaretskii

(Fdelete_process, Fprocess_id, sigchld_handler): Copy PID into EMACS_INT

to avoid GCC warnings.
parent 9bd1cd35
2007-01-13 Eli Zaretskii <eliz@gnu.org> 2007-01-13 Eli Zaretskii <eliz@gnu.org>
* process.c (Fdelete_process, Fprocess_id, sigchld_handler): Copy
PID into EMACS_INT to avoid GCC warnings.
* fns.c (maybe_resize_hash_table): Copy new size of hash table * fns.c (maybe_resize_hash_table): Copy new size of hash table
into EMACS_INT to avoid GCC warnings. into EMACS_INT to avoid GCC warnings.
......
...@@ -815,9 +815,12 @@ nil, indicating the current buffer's process. */) ...@@ -815,9 +815,12 @@ nil, indicating the current buffer's process. */)
{ {
#ifdef SIGCHLD #ifdef SIGCHLD
Lisp_Object symbol; 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. */ /* 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. */ /* GC treated elements set to nil. */
Fdelq (Qnil, deleted_pid_list)); Fdelq (Qnil, deleted_pid_list));
/* If the process has already signaled, remove it from the list. */ /* If the process has already signaled, remove it from the list. */
...@@ -827,7 +830,7 @@ nil, indicating the current buffer's process. */) ...@@ -827,7 +830,7 @@ nil, indicating the current buffer's process. */)
if (CONSP (p->status)) if (CONSP (p->status))
symbol = XCAR (p->status); symbol = XCAR (p->status);
if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) 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 else
#endif #endif
{ {
...@@ -912,10 +915,13 @@ For a network connection, this value is nil. */) ...@@ -912,10 +915,13 @@ For a network connection, this value is nil. */)
(process) (process)
register Lisp_Object process; register Lisp_Object process;
{ {
/* Assignment to EMACS_INT stops GCC whining about limited range of
data type. */
EMACS_INT pid;
CHECK_PROCESS (process); CHECK_PROCESS (process);
return (XPROCESS (process)->pid pid = XPROCESS (process)->pid;
? make_fixnum_or_float (XPROCESS (process)->pid) return (pid ? make_fixnum_or_float (pid) : Qnil);
: Qnil);
} }
DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0, DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0,
...@@ -6405,7 +6411,7 @@ sigchld_handler (signo) ...@@ -6405,7 +6411,7 @@ sigchld_handler (signo)
while (1) while (1)
{ {
register int pid; register EMACS_INT pid;
WAITTYPE w; WAITTYPE w;
Lisp_Object tail; Lisp_Object tail;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment