[Libreoffice-commits] core.git: rsc/source
Stephan Bergmann
sbergman at redhat.com
Tue Feb 2 12:42:06 UTC 2016
rsc/source/rscpp/cpp4.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 4120449c863c7ec01f5098f04be1af15a326a5b2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Feb 2 13:39:40 2016 +0100
Compiler warning battle
...where 05642b446c39c1551d2d703be18158c7ae0f0c36 "-Werror,-Wconstant-conversion
(from 255 to -1)" caused MSVC to counter with "warning C4310: cast truncates
constant value"
Change-Id: I7d80825a01e49817d7989e00774fed1f162dea85
diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c
index 98ec8a3..eab7b15 100644
--- a/rsc/source/rscpp/cpp4.c
+++ b/rsc/source/rscpp/cpp4.c
@@ -277,7 +277,14 @@ void stparmscan(int delim)
{
#ifdef SOLAR
*wp++ = DEL;
- *wp++ = (char)(MAC_PARM + PAR_MAC); /* Stuff a magic marker */
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wconstant-conversion"
+#endif
+ *wp++ = MAC_PARM + PAR_MAC; /* Stuff a magic marker */
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
*wp++ = (char)(i + MAC_PARM); /* Make a formal marker */
*wp = wp[-4]; /* Add on closing quote */
workp = wp + 1; /* Reset string end */
More information about the Libreoffice-commits
mailing list