aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorEli Zaretskii2007-01-13 21:58:23 +0000
committerEli Zaretskii2007-01-13 21:58:23 +0000
commitd30fe7798a37dd32a4ad0aa32289accc3a0f57d8 (patch)
treeac25c6c2f97f8920c8842a337b5b1acffde6ae8f /src/process.c
parent9bd1cd35febc3cdb8d244c42fad136c496cafdaf (diff)
downloademacs-d30fe7798a37dd32a4ad0aa32289accc3a0f57d8.tar.gz
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.c18
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. */)
815 { 815 {
816#ifdef SIGCHLD 816#ifdef SIGCHLD
817 Lisp_Object symbol; 817 Lisp_Object symbol;
818 /* Assignment to EMACS_INT stops GCC whining about limited range
819 of data type. */
820 EMACS_INT pid = p->pid;;
818 821
819 /* No problem storing the pid here, as it is still in Vprocess_alist. */ 822 /* No problem storing the pid here, as it is still in Vprocess_alist. */
820 deleted_pid_list = Fcons (make_fixnum_or_float (p->pid), 823 deleted_pid_list = Fcons (make_fixnum_or_float (pid),
821 /* GC treated elements set to nil. */ 824 /* GC treated elements set to nil. */
822 Fdelq (Qnil, deleted_pid_list)); 825 Fdelq (Qnil, deleted_pid_list));
823 /* If the process has already signaled, remove it from the list. */ 826 /* If the process has already signaled, remove it from the list. */
@@ -827,7 +830,7 @@ nil, indicating the current buffer's process. */)
827 if (CONSP (p->status)) 830 if (CONSP (p->status))
828 symbol = XCAR (p->status); 831 symbol = XCAR (p->status);
829 if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) 832 if (EQ (symbol, Qsignal) || EQ (symbol, Qexit))
830 Fdelete (make_fixnum_or_float (p->pid), deleted_pid_list); 833 Fdelete (make_fixnum_or_float (pid), deleted_pid_list);
831 else 834 else
832#endif 835#endif
833 { 836 {
@@ -912,10 +915,13 @@ For a network connection, this value is nil. */)
912 (process) 915 (process)
913 register Lisp_Object process; 916 register Lisp_Object process;
914{ 917{
918 /* Assignment to EMACS_INT stops GCC whining about limited range of
919 data type. */
920 EMACS_INT pid;
921
915 CHECK_PROCESS (process); 922 CHECK_PROCESS (process);
916 return (XPROCESS (process)->pid 923 pid = XPROCESS (process)->pid;
917 ? make_fixnum_or_float (XPROCESS (process)->pid) 924 return (pid ? make_fixnum_or_float (pid) : Qnil);
918 : Qnil);
919} 925}
920 926
921DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0, 927DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0,
@@ -6405,7 +6411,7 @@ sigchld_handler (signo)
6405 6411
6406 while (1) 6412 while (1)
6407 { 6413 {
6408 register int pid; 6414 register EMACS_INT pid;
6409 WAITTYPE w; 6415 WAITTYPE w;
6410 Lisp_Object tail; 6416 Lisp_Object tail;
6411 6417