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


Origin commit data
------------------
Branch: ni/coolstream
Commit: fe8d126f0a
Author: J. Krieg <bellum07@googlemail.com>
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
This commit is contained in:
J. Krieg
2019-12-29 23:06:12 +01:00
committed by vanhofen
parent 7bd012dd43
commit bea436c7cc

View File

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