APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1510077558 0
# Tue Nov 07 17:59:18 2017 +0000
# Node ID 52af36c1d4781c2bce577f240c75f9d67cd5c2f5
# Parent 6c493b7790729ec2b805a5967c9374258998613d
Quieten some compiler warnings on 64 bit Linux, clang-3.8.
src/ChangeLog addition:
2017-11-07 Aidan Kehoe <kehoea(a)parhasard.net>
Quieten some compiler warnings:
* data.c (uint32_t_to_lisp):
Add a check for sizeof (ITEM), which quietens the
tautological-constant-compare warning on clang.
* linuxplay.c (linux_play_data_or_file):
Declare a ssize_t variable to take the result of read(). There are
a lot of issues with the types used for bytecounts for the sound
code, but I'm not going to fix them all today.
* tls.c:
Wrap a couple of declarations of Lisp variables in #ifdef WITH_TLS.
diff -r 6c493b779072 -r 52af36c1d478 src/ChangeLog
--- a/src/ChangeLog Tue Nov 07 17:44:11 2017 +0000
+++ b/src/ChangeLog Tue Nov 07 17:59:18 2017 +0000
@@ -1,3 +1,16 @@
+2017-11-07 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ Quieten some compiler warnings:
+ * data.c (uint32_t_to_lisp):
+ Add a check for sizeof (ITEM), which quietens the
+ tautological-constant-compare warning on clang.
+ * linuxplay.c (linux_play_data_or_file):
+ Declare a ssize_t variable to take the result of read(). There are
+ a lot of issues with the types used for bytecounts for the sound
+ code, but I'm not going to fix them all today.
+ * tls.c:
+ Wrap a couple of declarations of Lisp variables in #ifdef WITH_TLS.
+
2017-11-07 Aidan Kehoe <kehoea(a)parhasard.net>
valid_ichar_p() needs an EMACS_INT argument, not an Ichar
diff -r 6c493b779072 -r 52af36c1d478 src/data.c
--- a/src/data.c Tue Nov 07 17:44:11 2017 +0000
+++ b/src/data.c Tue Nov 07 17:59:18 2017 +0000
@@ -1153,7 +1153,8 @@
Lisp_Object
uint32_t_to_lisp (UINT_32_BIT item)
{
- if (item <= MOST_POSITIVE_FIXNUM_UNSIGNED) /* Fits in a positive fixnum? */
+ if (sizeof (item) < sizeof (EMACS_INT) /* Fits in a positive fixnum? */
+ || item <= MOST_POSITIVE_FIXNUM_UNSIGNED)
{
return make_fixnum (item);
}
diff -r 6c493b779072 -r 52af36c1d478 src/linuxplay.c
--- a/src/linuxplay.c Tue Nov 07 17:44:11 2017 +0000
+++ b/src/linuxplay.c Tue Nov 07 17:59:18 2017 +0000
@@ -338,8 +338,14 @@
sound_warn(buf);
goto END_OF_PLAY; } }
if (fd >= 0) {
- if ((rrtn = read(fd,sndbuf,SNDBUFSZ)) < 0) {
- sound_perror("read"); goto END_OF_PLAY; } }
+ ssize_t gelesen;
+ if ((gelesen = read(fd,sndbuf,SNDBUFSZ)) < 0)
+ {
+ sound_perror("read");
+ goto END_OF_PLAY;
+ }
+ rrtn = (size_t) gelesen;
+ }
else
break;
} while (rrtn > 0);
diff -r 6c493b779072 -r 52af36c1d478 src/tls.c
--- a/src/tls.c Tue Nov 07 17:44:11 2017 +0000
+++ b/src/tls.c Tue Nov 07 17:59:18 2017 +0000
@@ -28,8 +28,10 @@
#include <netinet/in.h>
#include <netinet/tcp.h>
+#ifdef WITH_TLS
static Lisp_Object prompt;
static Lisp_Object Qread_passwd;
+#endif
Lisp_Object Qtls_error;
#ifdef HAVE_NSS
--
‘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)