From 5f51ee491b00c48736ddea904d4d4307ce7e9c88 Mon Sep 17 00:00:00 2001 From: "J. Krieg" Date: Sun, 29 Dec 2019 14:56:26 +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 --- 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 2c27c6e65..2db52bb1e 100644 --- a/src/driver/fb_generic.cpp +++ b/src/driver/fb_generic.cpp @@ -1533,7 +1533,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;