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 is contained in:
J. Krieg
2019-12-29 14:56:26 +01:00
committed by Thilo Graf
parent e536d5cef1
commit 5f51ee491b

View File

@@ -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;