APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1523867959 -3600
# Mon Apr 16 09:39:19 2018 +0100
# Node ID 78f89a29541b08276b6c8f4c4fca00e2fb6ab7eb
# Parent fddc26a4bf701ec3b4d7c9d855e4ab41788d32f5
Quiet some compiler warnings, src/
src/ChangeLog addition:
2018-04-16 Aidan Kehoe <kehoea(a)parhasard.net>
* fileio.c (Finsert_file_contents_internal):
Be clearer about not using an unitialised OFFSET in an lseek(2)
call here.
* regex.c (re_wctype):
Match the argument types used in the declaration in regex.h, to
placate the C++ compiler.
* text.c:
Only make unicode_internal_handle_bad_ichar_to_unicode() available
on unicode-internal builds.
* tls.h (tls_negotiate):
Rework this stub macro to mark its arguments as used.
* vdb.c (Ftest_vdb):
Quiet the compiler regarding one variable here.
diff -r fddc26a4bf70 -r 78f89a29541b src/ChangeLog
--- a/src/ChangeLog Tue Apr 10 13:54:31 2018 +0100
+++ b/src/ChangeLog Mon Apr 16 09:39:19 2018 +0100
@@ -1,3 +1,19 @@
+2018-04-16 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * fileio.c (Finsert_file_contents_internal):
+ Be clearer about not using an unitialised OFFSET in an lseek(2)
+ call here.
+ * regex.c (re_wctype):
+ Match the argument types used in the declaration in regex.h, to
+ placate the C++ compiler.
+ * text.c:
+ Only make unicode_internal_handle_bad_ichar_to_unicode() available
+ on unicode-internal builds.
+ * tls.h (tls_negotiate):
+ Rework this stub macro to mark its arguments as used.
+ * vdb.c (Ftest_vdb):
+ Quiet the compiler regarding one variable here.
+
2018-04-10 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in:
diff -r fddc26a4bf70 -r 78f89a29541b src/fileio.c
--- a/src/fileio.c Tue Apr 10 13:54:31 2018 +0100
+++ b/src/fileio.c Mon Apr 16 09:39:19 2018 +0100
@@ -3231,14 +3231,7 @@
where it should be. */
|| (!NILP (replace) && do_speedy_insert))
{
- OFF_T starting;
-
- if (NUMBERP (start))
- {
- starting = lisp_to_off_t (start);
- }
-
- if (lseek (fd, starting, 0) < 0)
+ if (lseek (fd, lisp_to_off_t (start), 0) < 0)
report_file_error ("Setting file position", filename);
}
diff -r fddc26a4bf70 -r 78f89a29541b src/regex.c
--- a/src/regex.c Tue Apr 10 13:54:31 2018 +0100
+++ b/src/regex.c Mon Apr 16 09:39:19 2018 +0100
@@ -2211,7 +2211,7 @@
Return RECC_ERROR if STRP doesn't match a known character class. */
re_wctype_t
-re_wctype (const re_char *beg, int limit)
+re_wctype (const unsigned char *beg, int limit)
{
/* Sort tests in the length=five case by frequency the classes to minimize
number of times we fail the comparison. The frequencies of character class
diff -r fddc26a4bf70 -r 78f89a29541b src/text.c
--- a/src/text.c Tue Apr 10 13:54:31 2018 +0100
+++ b/src/text.c Mon Apr 16 09:39:19 2018 +0100
@@ -1857,7 +1857,7 @@
return -1;
}
-#endif /* not UNICODE_INTERNAL */
+#else /* if defined (UNICODE_INTERNAL) */
int
unicode_internal_handle_bad_ichar_to_unicode (Ichar chr, enum converr fail)
@@ -1892,6 +1892,8 @@
}
}
+#endif /* defined (UNICODE_INTERNAL) */
+
#endif /* MULE */
/* Take a possibly invalid Ichar value (must be >= 0) and move upwards as
diff -r fddc26a4bf70 -r 78f89a29541b src/tls.h
--- a/src/tls.h Tue Apr 10 13:54:31 2018 +0100
+++ b/src/tls.h Mon Apr 16 09:39:19 2018 +0100
@@ -82,7 +82,8 @@
#define TLS_SETUP_SOCK 1
#define tls_open(x,y) (signal_error (Qtls_error, "TLS support unavailable", \
Qnil), (tls_state_t *) NULL)
-#define tls_negotiate(x,y,z) ((tls_state_t *) NULL)
+#define tls_negotiate(x,y,z) (USED (x), USED (y), USED (z), \
+ (tls_state_t *) NULL)
#define make_tls_input_stream(x) (signal_error (Qtls_error, \
"TLS support unavailable", \
Qnil), Qnil)
diff -r fddc26a4bf70 -r 78f89a29541b src/vdb.c
--- a/src/vdb.c Tue Apr 10 13:54:31 2018 +0100
+++ b/src/vdb.c Mon Apr 16 09:39:19 2018 +0100
@@ -98,6 +98,7 @@
fprintf (stderr, "Attempt to read p[666]... ");
c = p[666];
fprintf (stderr, "read ok.\n");
+ USED (c); /* Quiet compiler. */
/* Test write. */
fprintf (stderr, "Attempt to write 42 to p[666]... ");
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)