APPROVE COMMIT 21.5
# HG changeset patch
# Parent a3aa49cd5d7559d6947d815a6aa78413e0010c30
Quiet clang about vdb_fault_handler prototype.
* * *
Quiet compiler warnings.
* * *
Combine with quiet-compiler, please.
diff -r a3aa49cd5d75 lwlib/ChangeLog
--- a/lwlib/ChangeLog Thu Nov 23 18:48:06 2017 +0000
+++ b/lwlib/ChangeLog Sat Nov 25 17:48:54 2017 +0900
@@ -1,3 +1,7 @@
+2017-11-23 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * lwlib-colors.c (xft_convert_color): Remove unused variable.
+
2017-11-12 Aidan Kehoe <kehoea(a)parhasard.net>
* lwlib-internal.h:
diff -r a3aa49cd5d75 lwlib/lwlib-colors.c
--- a/lwlib/lwlib-colors.c Thu Nov 23 18:48:06 2017 +0000
+++ b/lwlib/lwlib-colors.c Sat Nov 25 17:48:54 2017 +0900
@@ -355,7 +355,6 @@
xft_convert_color (Display *dpy, Colormap cmap, Visual *visual, int c, int dim)
{
static XColor color; /* #### why is this static ?? */
- XftColor result;
color.pixel = c;
XQueryColor(dpy, cmap, &color);
diff -r a3aa49cd5d75 src/ChangeLog
--- a/src/ChangeLog Thu Nov 23 18:48:06 2017 +0000
+++ b/src/ChangeLog Sat Nov 25 17:48:54 2017 +0900
@@ -1,3 +1,19 @@
+2017-11-24 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+2017-11-23 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * sysdep.c (total_data_usage):
+ Document that sbrk(0) usage is still OK.
+
+ * window.c (window_divider_width):
+ * window-impl.h (MODELINE_OFF_SHADOW_THICKNESS_ADJUSTED):
+ Use EMACS_INT_ABS to shut up compiler.
+
+ * lread.c (read1): Comment too-clever logic.
+
+ * vdb-posix.c (vdb_fault_handler):
+ Add prototype to quiet clang (at least 4.0 and 5.0).
+
2017-11-23 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in:
diff -r a3aa49cd5d75 src/lread.c
--- a/src/lread.c Thu Nov 23 18:48:06 2017 +0000
+++ b/src/lread.c Sat Nov 25 17:48:54 2017 +0900
@@ -2644,6 +2644,9 @@
while ((c = readchar (readcharfun)) >= 0
&& c >= '0' && c <= '9')
{
+ /* #### I think this logic is wrong. Skip can be in the
+ range 0x40000000-0xffffffff, the overflow will not
+ trigger, but this won't fit in a fixnum. */
skip = (10 * skip) + (c - '0');
if (oskip <= skip)
{
diff -r a3aa49cd5d75 src/sysdep.c
--- a/src/sysdep.c Thu Nov 23 18:48:06 2017 +0000
+++ b/src/sysdep.c Sat Nov 25 17:48:54 2017 +0900
@@ -1991,6 +1991,9 @@
#endif
#ifndef WIN32_ANY
+ /* clang emits a deprecation warning but this usage documented OK.
+ On Linux, apparently can use /proc filesystem; on Mac OS X need to use
+ mach_vm_region_info which looks annoying. */
void *data_end = sbrk (0);
#else
void *data_end = maximum_address_seen;
diff -r a3aa49cd5d75 src/vdb-posix.c
--- a/src/vdb-posix.c Thu Nov 23 18:48:06 2017 +0000
+++ b/src/vdb-posix.c Sat Nov 25 17:48:54 2017 +0900
@@ -55,6 +55,7 @@
sighandler_t segv_oact, bus_oact;
#endif /* USE_SIGNAL */
+void vdb_fault_handler (FAULT_HANDLER_ARGUMENTS);
void vdb_remove_signal_handler (void);
void
diff -r a3aa49cd5d75 src/window-impl.h
--- a/src/window-impl.h Thu Nov 23 18:48:06 2017 +0000
+++ b/src/window-impl.h Sat Nov 25 17:48:54 2017 +0900
@@ -269,12 +269,12 @@
#define WINDOW_HAS_MODELINE_P(w) (!NILP (w->has_modeline_p))
#define MODELINE_OFF_SHADOW_THICKNESS_ADJUSTED(win) \
- abs ((!WINDOW_HAS_MODELINE_P (win) \
- ? ((XFIXNUM (win->modeline_shadow_thickness) > 1) \
- ? XFIXNUM (win->modeline_shadow_thickness) - 1 \
+ EMACS_INT_ABS ((!WINDOW_HAS_MODELINE_P (win) \
+ ? ((XFIXNUM (win->modeline_shadow_thickness) > 1) \
+ ? XFIXNUM (win->modeline_shadow_thickness) - 1 \
: ((XFIXNUM (win->modeline_shadow_thickness) < -1) \
? XFIXNUM (win->modeline_shadow_thickness) + 1 \
- : XFIXNUM (win->modeline_shadow_thickness))) \
+ : XFIXNUM (win->modeline_shadow_thickness))) \
: XFIXNUM (win->modeline_shadow_thickness)))
#define MODELINE_SHADOW_THICKNESS(win) \
diff -r a3aa49cd5d75 src/window.c
--- a/src/window.c Thu Nov 23 18:48:06 2017 +0000
+++ b/src/window.c Sat Nov 25 17:48:54 2017 +0900
@@ -1062,7 +1062,7 @@
return
XFIXNUM (w->vertical_divider_line_width)
+ 2 * XFIXNUM (w->vertical_divider_spacing)
- + 2 * abs (XFIXNUM (w->vertical_divider_shadow_thickness));
+ + 2 * EMACS_INT_ABS (XFIXNUM (w->vertical_divider_shadow_thickness));
else
return XFIXNUM (w->vertical_divider_line_width) == 0 ? 0 : 1;
}