glcd: fix compiler warnings

Origin commit data
------------------
Branch: ni/coolstream
Commit: 1832c23831
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-06-21 (Sun, 21 Jun 2020)

Origin message was:
------------------
- glcd: fix compiler warnings

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2020-06-21 22:27:33 +02:00
parent 76f98dc38b
commit 9d36a271e1

View File

@@ -226,7 +226,6 @@ void cGLCD::Exec()
if (doStandbyTime) if (doStandbyTime)
{ {
std::string Time;
if (g_settings.glcd_time_in_standby == CLOCK_ANALOG) if (g_settings.glcd_time_in_standby == CLOCK_ANALOG)
{ {
ShowAnalogClock(tm->tm_hour, tm->tm_min, tm->tm_sec, bitmap->Width()/2, bitmap->Height()/2); ShowAnalogClock(tm->tm_hour, tm->tm_min, tm->tm_sec, bitmap->Width()/2, bitmap->Height()/2);
@@ -237,8 +236,7 @@ void cGLCD::Exec()
} }
else if (g_settings.glcd_time_in_standby > CLOCK_OFF) else if (g_settings.glcd_time_in_standby > CLOCK_OFF)
{ {
Time = strftime("%H:%M", tm); ShowSimpleClock(strftime("%H:%M", tm), g_settings.glcd_time_in_standby);
ShowSimpleClock(Time, g_settings.glcd_time_in_standby);
} }
if (g_settings.glcd_standby_weather == 1 && g_settings.glcd_time_in_standby != 5) if (g_settings.glcd_standby_weather == 1 && g_settings.glcd_time_in_standby != 5)
{ {
@@ -832,7 +830,6 @@ void cGLCD::Run(void)
bitmap->Clear(GLCD::cColor::Black); bitmap->Clear(GLCD::cColor::Black);
ts.tv_sec = 0; // don't wait ts.tv_sec = 0; // don't wait
static CFrameBuffer* fb = CFrameBuffer::getInstance(); static CFrameBuffer* fb = CFrameBuffer::getInstance();
static int fb_width = fb->getScreenWidth(true);
static int fb_height = fb->getScreenHeight(true); static int fb_height = fb->getScreenHeight(true);
static uint32_t *fbp = fb->getFrameBufferPointer(); static uint32_t *fbp = fb->getFrameBufferPointer();
int lcd_width = bitmap->Width(); int lcd_width = bitmap->Width();
@@ -842,6 +839,7 @@ void cGLCD::Run(void)
if (!showImage(fbp, fb_stride, fb_height, 0, 0, lcd_width, lcd_height, false, true)) if (!showImage(fbp, fb_stride, fb_height, 0, 0, lcd_width, lcd_height, false, true))
{ {
#else #else
static int fb_width = fb->getScreenWidth(true);
if (!showImage(fbp, fb_width, fb_height, 0, 0, lcd_width, lcd_height, false, true)) if (!showImage(fbp, fb_width, fb_height, 0, 0, lcd_width, lcd_height, false, true))
{ {
#endif #endif
@@ -1099,7 +1097,7 @@ void cGLCD::Run(void)
{ {
lcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height()); lcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height());
lcd->Refresh(false); lcd->Refresh(false);
sleep(1); sleep(4);
lcd->SetBrightness(0); lcd->SetBrightness(0);
} }
else else
@@ -1499,8 +1497,6 @@ bool cGLCD::imageShow(const std::string & filename, uint32_t dx, uint32_t dy, ui
bool cGLCD::drawText(int x, int y, int xmax, int text_width, const std::string & text, const GLCD::cFont * font, uint32_t color1, uint32_t color2, bool proportional, int skipPixels, int align) bool cGLCD::drawText(int x, int y, int xmax, int text_width, const std::string & text, const GLCD::cFont * font, uint32_t color1, uint32_t color2, bool proportional, int skipPixels, int align)
{ {
SNeutrinoGlcdTheme &t = g_settings.glcd_theme;
int z = 0; int z = 0;
if (align == ALIGN_NONE) if (align == ALIGN_NONE)
@@ -1569,7 +1565,7 @@ bool cGLCD::dumpBuffer(fb_pixel_t *s, int format, const char *filename)
if (output_bytes == 3) // swap bgr<->rgb if (output_bytes == 3) // swap bgr<->rgb
{ {
int y; int y;
#pragma omp parallel for shared(output) //#pragma omp parallel for shared(output)
for (y = 0; y < yres; y++) for (y = 0; y < yres; y++)
{ {
int xres1 = y * xres * 3; int xres1 = y * xres * 3;
@@ -1585,7 +1581,7 @@ bool cGLCD::dumpBuffer(fb_pixel_t *s, int format, const char *filename)
else // swap bgr<->rgb and eliminate alpha channel jpgs are always saved with 24bit without alpha channel else // swap bgr<->rgb and eliminate alpha channel jpgs are always saved with 24bit without alpha channel
{ {
int y; int y;
#pragma omp parallel for shared(output) //#pragma omp parallel for shared(output)
for (y = 0; y < yres; y++) for (y = 0; y < yres; y++)
{ {
unsigned char *scanline = output + (y * row_stride); unsigned char *scanline = output + (y * row_stride);
@@ -1636,7 +1632,7 @@ bool cGLCD::dumpBuffer(fb_pixel_t *s, int format, const char *filename)
row_pointers=(png_bytep*)malloc(sizeof(png_bytep)*yres); row_pointers=(png_bytep*)malloc(sizeof(png_bytep)*yres);
int y; int y;
#pragma omp parallel for shared(output) //#pragma omp parallel for shared(output)
for (y=0; y<yres; y++) for (y=0; y<yres; y++)
row_pointers[y]=output+(y*xres*output_bytes); row_pointers[y]=output+(y*xres*output_bytes);