aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-06-08 11:44:23 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-06-08 11:44:23 +0200
commit55e96edb7bbb849fafaf628119fc2db9dea22e1e (patch)
tree44a3fe66c6122ebad62e5e8bff58d00dd3cb4698 /erts
parenta39395d4f99aff99ac57ab40a3191fa13a7371fd (diff)
parente2bb65e6354123ac5d0ec9e2c1de6a92ae581161 (diff)
downloadotp-55e96edb7bbb849fafaf628119fc2db9dea22e1e.tar.gz
otp-55e96edb7bbb849fafaf628119fc2db9dea22e1e.tar.bz2
otp-55e96edb7bbb849fafaf628119fc2db9dea22e1e.zip
Merge branch 'egil/erts/fix-clang-compiler-warnings'
* egil/erts/fix-clang-compiler-warnings: erl_interface: Let struct iovec * be visible erts: Let clang have suppressable unused variables erts: Remove tautological compare warning
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_bif_port.c2
-rw-r--r--erts/emulator/beam/sys.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_port.c b/erts/emulator/beam/erl_bif_port.c
index 37f4e1de49..fefa9d8391 100644
--- a/erts/emulator/beam/erl_bif_port.c
+++ b/erts/emulator/beam/erl_bif_port.c
@@ -1411,7 +1411,7 @@ BIF_RETTYPE decode_packet_3(BIF_ALIST_3)
trunc_len = val;
goto next_option;
case am_line_delimiter:
- if (type == TCP_PB_LINE_LF && val >= 0 && val <= 255) {
+ if (type == TCP_PB_LINE_LF && val <= 255) {
delimiter = (char)val;
goto next_option;
}
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index 9a205d50d3..dfe82cab44 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -154,8 +154,9 @@ typedef ERTS_SYS_FD_TYPE ErtsSysFdType;
# define ERTS_WRITE_UNLIKELY(X) X
#endif
+/* clang may have too low __GNUC__ versions but can handle it */
#ifdef __GNUC__
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5)
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5) || defined(__clang__)
# define ERTS_DECLARE_DUMMY(X) X __attribute__ ((unused))
# else
# define ERTS_DECLARE_DUMMY(X) X