mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user