From 0b1106d8fabde72593c1c2c12c2f8ff3e37397bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Sat, 19 Nov 2016 11:03:49 +0100 Subject: [PATCH] explain shift-count-overflow warning during the compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do it in comment. This may be probably fixed with a preprocessor, but it's not that obvious – we need off_t number of bits available at the compilation time and compare it to FIXNUM bits. --- src/c/file.d | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/c/file.d b/src/c/file.d index c76048c80..d3e1794eb 100755 --- a/src/c/file.d +++ b/src/c/file.d @@ -5338,6 +5338,11 @@ flisten(cl_object stream, FILE *fp) return !ECL_LISTEN_AVAILABLE; } +/* Compilation of this function on some platforms may give a warning: + "right shift count >= width of type [-Werror=shift-count-overflow]" + but on these platforms this branch is never encountered. + + FIXME: this can probably be conditionaly defined in #if … #endif */ cl_object ecl_off_t_to_integer(ecl_off_t offset) { @@ -5362,6 +5367,11 @@ ecl_off_t_to_integer(ecl_off_t offset) return output; } +/* Compilation of this function on some platforms may give a warning: + "left shift count >= width of type [-Werror=shift-count-overflow]" + but on these platforms this branch is never encountered. + + FIXME: this can probably be conditionaly defined in #if … #endif */ ecl_off_t ecl_integer_to_off_t(cl_object offset) {