From bea436c7cc1d6533a46899a6fc9d19e805b1e8a9 Mon Sep 17 00:00:00 2001 From: "J. Krieg" Date: Sun, 29 Dec 2019 23:06:12 +0100 Subject: [PATCH] fb_generic: fix compile with '-Werror' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit error caused by commit ca9c47b - fb_generic: use parameters as const ref, catch possible dimension error: /home/bellum/neutrino/bbs/source/gui-neutrino/src/driver/fb_generic.cpp: In member function ‘void CFrameBuffer::RestoreScreen(const int&, const int&, const int&, const int&, uint32_t*)’: /home/bellum/neutrino/bbs/source/gui-neutrino/src/driver/fb_generic.cpp:1536:9: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (dx > xRes || dy > yRes) ^ /home/bellum/neutrino/bbs-test/source/gui-neutrino/src/driver/fb_generic.cpp:1536:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (dx > xRes || dy > yRes) ^ cc1plus: all warnings being treated as errors Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fe8d126f0adf36a287e4643de6e11ebe478b68aa Author: J. Krieg Date: 2019-12-29 (Sun, 29 Dec 2019) Origin message was: ------------------ fb_generic: fix compile with '-Werror' error caused by commit ca9c47b - fb_generic: use parameters as const ref, catch possible dimension error: /home/bellum/neutrino/bbs/source/gui-neutrino/src/driver/fb_generic.cpp: In member function ‘void CFrameBuffer::RestoreScreen(const int&, const int&, const int&, const int&, uint32_t*)’: /home/bellum/neutrino/bbs/source/gui-neutrino/src/driver/fb_generic.cpp:1536:9: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (dx > xRes || dy > yRes) ^ /home/bellum/neutrino/bbs-test/source/gui-neutrino/src/driver/fb_generic.cpp:1536:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (dx > xRes || dy > yRes) ^ cc1plus: all warnings being treated as errors ------------------ This commit was generated by Migit --- src/driver/fb_generic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver/fb_generic.cpp b/src/driver/fb_generic.cpp index ad7c3a87b..82cc1f561 100644 --- a/src/driver/fb_generic.cpp +++ b/src/driver/fb_generic.cpp @@ -1525,7 +1525,7 @@ void CFrameBuffer::RestoreScreen(const int& x, const int& y, const int& dx, cons if (!getActive()) return; - if (dx > xRes || dy > yRes) + if (dx > (int)xRes || dy > (int)yRes) { dprintf(DEBUG_NORMAL, "\033[31m[CFrameBuffer]\[%s - %d], dimension error dx [%d] dy [%d] \033[0m\n", __func__, __LINE__, dx, dy); return;