aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2012-06-23 22:40:50 +0300
committerEli Zaretskii2012-06-23 22:40:50 +0300
commitb82c175521ddd7d7ae8183c62fc87587b8b615e5 (patch)
tree98823e38dcfd5074c9ef3dcd487c62fa5e9320e8 /src
parent049ec95ba5b2c54fb16aaee9d89057f87249c42e (diff)
downloademacs-b82c175521ddd7d7ae8183c62fc87587b8b615e5.tar.gz
emacs-b82c175521ddd7d7ae8183c62fc87587b8b615e5.zip
Avoid compiler warnings in comparing time_t.
src/dispnew.c (sit_for, Fsleep_for): src/keyboard.c (kbd_buffer_get_event): src/process.c (Faccept_process_output): Avoid compiler warnings when comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/dispnew.c7
-rw-r--r--src/keyboard.c6
-rw-r--r--src/process.c4
4 files changed, 19 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d0b6f145227..40073d32834 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12012-06-23 Eli Zaretskii <eliz@gnu.org>
2
3 * dispnew.c (sit_for, Fsleep_for):
4 * keyboard.c (kbd_buffer_get_event):
5 * process.c (Faccept_process_output): Avoid compiler warnings when
6 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
7
12012-06-23 Juanma Barranquero <lekktu@gmail.com> 82012-06-23 Juanma Barranquero <lekktu@gmail.com>
2 9
3 * makefile.w32-in: Update dependencies. 10 * makefile.w32-in: Update dependencies.
diff --git a/src/dispnew.c b/src/dispnew.c
index 5582607ff6a..e18fca6f122 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5957,7 +5957,9 @@ additional wait period, in milliseconds; this is for backwards compatibility.
5957 if (0 < duration) 5957 if (0 < duration)
5958 { 5958 {
5959 EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (duration); 5959 EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (duration);
5960 wait_reading_process_output (min (EMACS_SECS (t), INTMAX_MAX), 5960 intmax_t secs = EMACS_SECS (t);
5961
5962 wait_reading_process_output (min (secs, INTMAX_MAX),
5961 EMACS_NSECS (t), 0, 0, Qnil, NULL, 0); 5963 EMACS_NSECS (t), 0, 0, Qnil, NULL, 0);
5962 } 5964 }
5963 5965
@@ -6005,7 +6007,8 @@ sit_for (Lisp_Object timeout, int reading, int do_display)
6005 else 6007 else
6006 { 6008 {
6007 EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (seconds); 6009 EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (seconds);
6008 sec = min (EMACS_SECS (t), INTMAX_MAX); 6010 sec = EMACS_SECS (t);
6011 sec = min (sec, INTMAX_MAX);
6009 nsec = EMACS_NSECS (t); 6012 nsec = EMACS_NSECS (t);
6010 } 6013 }
6011 } 6014 }
diff --git a/src/keyboard.c b/src/keyboard.c
index 0e8d22c2b1c..38b05c22063 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3857,9 +3857,11 @@ kbd_buffer_get_event (KBOARD **kbp,
3857 return Qnil; /* finished waiting */ 3857 return Qnil; /* finished waiting */
3858 else 3858 else
3859 { 3859 {
3860 intmax_t secs;
3861
3860 EMACS_SUB_TIME (duration, *end_time, duration); 3862 EMACS_SUB_TIME (duration, *end_time, duration);
3861 wait_reading_process_output (min (EMACS_SECS (duration), 3863 secs = EMACS_SECS (duration);
3862 INTMAX_MAX), 3864 wait_reading_process_output (min (secs, INTMAX_MAX),
3863 EMACS_NSECS (duration), 3865 EMACS_NSECS (duration),
3864 -1, 1, Qnil, NULL, 0); 3866 -1, 1, Qnil, NULL, 0);
3865 } 3867 }
diff --git a/src/process.c b/src/process.c
index 0ee0e499d6e..b41a77f58fd 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3996,7 +3996,9 @@ Return non-nil if we received any output before the timeout expired. */)
3996 if (0 < XFLOAT_DATA (seconds)) 3996 if (0 < XFLOAT_DATA (seconds))
3997 { 3997 {
3998 EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (XFLOAT_DATA (seconds)); 3998 EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (XFLOAT_DATA (seconds));
3999 secs = min (EMACS_SECS (t), INTMAX_MAX); 3999
4000 secs = EMACS_SECS (t);
4001 secs = min (secs, INTMAX_MAX);
4000 nsecs = EMACS_NSECS (t); 4002 nsecs = EMACS_NSECS (t);
4001 } 4003 }
4002 } 4004 }