mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
fb_generic: fix compil warning
Origin commit data
------------------
Branch: ni/coolstream
Commit: 3fbd2b1716
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-29 (Wed, 29 Jan 2020)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -770,7 +770,12 @@ bool CFrameBuffer::paintIcon8(const std::string & filename, const int x, const i
|
||||
return false;
|
||||
}
|
||||
|
||||
read(lfd, &header, sizeof(struct rawHeader));
|
||||
ssize_t r = read(lfd, &header, sizeof(struct rawHeader));
|
||||
if(r <= 0)
|
||||
{
|
||||
close(fd);
|
||||
return false;
|
||||
}
|
||||
|
||||
width = (header.width_hi << 8) | header.width_lo;
|
||||
height = (header.height_hi << 8) | header.height_lo;
|
||||
@@ -786,7 +791,11 @@ bool CFrameBuffer::paintIcon8(const std::string & filename, const int x, const i
|
||||
fb_pixel_t *d = getFrameBufferPointer() + x + swidth * y;
|
||||
fb_pixel_t * d2;
|
||||
for (int count=0; count<height; count ++ ) {
|
||||
read(lfd, &pixbuf[0], width );
|
||||
r = read(lfd, &pixbuf[0], width );
|
||||
if(r <= 0){
|
||||
close(fd);
|
||||
return false;
|
||||
}
|
||||
unsigned char *pixpos = &pixbuf[0];
|
||||
d2 = d;
|
||||
for (int count2=0; count2<width; count2 ++ ) {
|
||||
@@ -884,7 +893,11 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
|
||||
|
||||
unsigned char pixbuf[768];
|
||||
for (int count = 0; count < height; count ++ ) {
|
||||
read(lfd, &pixbuf[0], width >> 1 );
|
||||
s = read(lfd, &pixbuf[0], width >> 1 );
|
||||
if(s <= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
unsigned char *pixpos = &pixbuf[0];
|
||||
for (int count2 = 0; count2 < width >> 1; count2 ++ ) {
|
||||
unsigned char compressed = *pixpos;
|
||||
|
Reference in New Issue
Block a user