Unverified Commit 2d44051a authored by Mihai Moldovan's avatar Mihai Moldovan

Merge branch 'uli42-pr/silence_nxcompshad_warnings' into 3.6.x

Fixes: ArcticaProject/nx-libs#572
parents 061c3577 2cade632
...@@ -337,7 +337,10 @@ int CorePoller::isChanged(int (*checkIfInputCallback)(void *), void *arg, int *s ...@@ -337,7 +337,10 @@ int CorePoller::isChanged(int (*checkIfInputCallback)(void *), void *arg, int *s
} }
} }
XRectangle rect = {0, curLine, width_, 1}; XRectangle rect = {0,
static_cast<short>(curLine),
static_cast<unsigned short>(width_),
1};
char *buffer; char *buffer;
...@@ -443,9 +446,13 @@ int CorePoller::isChanged(int (*checkIfInputCallback)(void *), void *arg, int *s ...@@ -443,9 +446,13 @@ int CorePoller::isChanged(int (*checkIfInputCallback)(void *), void *arg, int *s
break; break;
} }
if ((curWorkLine - last > minSliceHeight_) || (last - start > maxSliceHeight_)) if ((curWorkLine - last > minSliceHeight_) ||
(last - start > maxSliceHeight_))
{ {
XRectangle rect = {left, start, right - left + 1, last - start + 1}; XRectangle rect = {static_cast<short>(left),
static_cast<short>(start),
static_cast<unsigned short>(right - left + 1),
static_cast<unsigned short>(last - start + 1)};
XUnionRectWithRegion(&rect, lastUpdatedRegion_, lastUpdatedRegion_); XUnionRectWithRegion(&rect, lastUpdatedRegion_, lastUpdatedRegion_);
...@@ -477,7 +484,10 @@ int CorePoller::isChanged(int (*checkIfInputCallback)(void *), void *arg, int *s ...@@ -477,7 +484,10 @@ int CorePoller::isChanged(int (*checkIfInputCallback)(void *), void *arg, int *s
if (last >= start) if (last >= start)
{ {
XRectangle rect = {left, start, right - left + 1, last - start + 1}; XRectangle rect = {static_cast<short>(left),
static_cast<short>(start),
static_cast<unsigned short>(right - left + 1),
static_cast<unsigned short>(last - start + 1)};
XUnionRectWithRegion(&rect, lastUpdatedRegion_, lastUpdatedRegion_); XUnionRectWithRegion(&rect, lastUpdatedRegion_, lastUpdatedRegion_);
} }
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
#include <cerrno> #include <cerrno>
#include <cstdarg> #include <cstdarg>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
// //
// Error handling macros. // Error handling macros.
// //
...@@ -164,4 +167,6 @@ static inline void logDump(const char *name, const char *data, int size) ...@@ -164,4 +167,6 @@ static inline void logDump(const char *name, const char *data, int size)
#endif #endif
} }
#pragma GCC diagnostic pop
#endif /* Logger_H */ #endif /* Logger_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment