Mark unused vars as comment

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@104 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
mws
2009-12-21 16:23:09 +00:00
parent 7b87012631
commit 1b13da2617
87 changed files with 1685 additions and 1684 deletions

View File

@@ -26,13 +26,13 @@ int fh_bmp_id(const char *name)
{
int fd;
char id[2];
fd = open(name, O_RDONLY);
if (fd == -1) {
// dbout("fh_bmp_id {\n");
return(0);
}
read(fd, id, 2);
close(fd);
if ( id[0]=='B' && id[1]=='M' ) {
@@ -86,7 +86,7 @@ int fh_bmp_load(const char *name,unsigned char **buffer,int* xp,int* yp)
read(fd, buff, 2);
bpp = buff[0] + (buff[1]<<8);
switch (bpp){
case 1: /* monochrome */
skip = fill4B(x/8+(x%8?1:0));
@@ -190,13 +190,13 @@ int fh_bmp_load(const char *name,unsigned char **buffer,int* xp,int* yp)
printf("Error: malloc\n");
return (FH_ERROR_MALLOC);
}
for (i=0; i<y; i++)
for (i=0; i<y; i++)
{
read(fd, tbuffer, x);
for (j=0; j<x; j++) {
wr_buffer[j*3] = pallete[tbuffer[j]].red;
wr_buffer[j*3+1] = pallete[tbuffer[j]].green;
wr_buffer[j*3+2] = pallete[tbuffer[j]].blue;
wr_buffer[j*3] = pallete[tbuffer[j]].red;
wr_buffer[j*3+1] = pallete[tbuffer[j]].green;
wr_buffer[j*3+2] = pallete[tbuffer[j]].blue;
}
if (skip) {
read(fd, buff, skip);
@@ -213,7 +213,7 @@ int fh_bmp_load(const char *name,unsigned char **buffer,int* xp,int* yp)
skip = fill4B(x*3);
lseek(fd, raster, SEEK_SET);
unsigned char c;
for (i=0; i<y; i++)
for (i=0; i<y; i++)
{
read(fd,wr_buffer,x*3);
for(j=0; j < x*3 ; j=j+3)
@@ -225,7 +225,7 @@ int fh_bmp_load(const char *name,unsigned char **buffer,int* xp,int* yp)
if (skip) {
read(fd, buff, skip);
}
wr_buffer -= x*3; // backoff 1 lines - x*3
wr_buffer -= x*3; // backoff 1 lines - x*3
}
break;
default:
@@ -236,7 +236,7 @@ int fh_bmp_load(const char *name,unsigned char **buffer,int* xp,int* yp)
// dbout("fh_bmp_load }\n");
return(FH_ERROR_OK);
}
int fh_bmp_getsize(const char *name,int *x,int *y, int wanted_width, int wanted_height)
int fh_bmp_getsize(const char *name,int *x,int *y, int /*wanted_width*/, int /*wanted_height*/)
{
// dbout("fh_bmp_getsize {\n");
int fd;
@@ -250,13 +250,13 @@ int fh_bmp_getsize(const char *name,int *x,int *y, int wanted_width, int wanted_
close(fd);//Resource leak: fd
return(FH_ERROR_FORMAT);
}
read(fd, size, 4);
*x = size[0] + (size[1]<<8) + (size[2]<<16) + (size[3]<<24);
// *x-=1;
read(fd, size, 4);
*y = size[0] + (size[1]<<8) + (size[2]<<16) + (size[3]<<24);
close(fd);
// dbout("fh_bmp_getsize }\n");
return(FH_ERROR_OK);

View File

@@ -160,7 +160,7 @@ void crw_cb_error_exit(j_common_ptr cinfo)
// dbout("crw_cb_error_exit }\n");
}
int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* yp)
int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* /*yp*/)
{
// dbout("fh_crw_load (%d/%d) {\n",x,y);
struct jpeg_decompress_struct cinfo;
@@ -215,7 +215,7 @@ int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* yp)
jpeg_read_scanlines(ciptr, &lb, 1);
memcpy(bp,lb,px*c);
bp+=px*c;
}
}
}
jpeg_finish_decompress(ciptr);
@@ -234,7 +234,7 @@ int fh_crw_getsize(const char *filename,int *x,int *y, int wanted_width, int wan
int px,py,c;
FILE *fh;
ciptr=&cinfo;
if(!(fh=fopen(filename,"rb"))) return(FH_ERROR_FILE);

View File

@@ -51,11 +51,11 @@ void blit2FB(void *fbbuff,
unsigned int xoffs, unsigned int yoffs,
int cpp);
void clearFB(int bpp,int cpp);
inline unsigned short make16color(uint32_t r, uint32_t g,
uint32_t b, uint32_t rl,
uint32_t ro, uint32_t gl,
uint32_t go, uint32_t bl,
uint32_t bo, uint32_t tl,
inline unsigned short make16color(uint32_t r, uint32_t g,
uint32_t b, uint32_t rl,
uint32_t ro, uint32_t gl,
uint32_t go, uint32_t bl,
uint32_t bo, uint32_t tl,
uint32_t to);
void fb_display(unsigned char *rgbbuff, int x_size, int y_size, int x_pan, int y_pan, int x_offs, int y_offs, bool clearfb, int transp)
@@ -75,7 +75,7 @@ void fb_display(unsigned char *rgbbuff, int x_size, int y_size, int x_pan, int y
/* correct offset */
if(x_offs + x_size > (int)var->xres) x_offs = 0;
if(y_offs + y_size > (int)var->yres) y_offs = 0;
//printf("fb_display: bits_per_pixel: %d\n", var->bits_per_pixel);
//printf("fb_display: var->xres %d var->yres %d x_size %d y_size %d\n", var->xres, var->yres, x_size, y_size);
/* blit buffer 2 fb */
@@ -111,7 +111,7 @@ void make332map(struct fb_cmap *map)
rs = 256 / (r - 1);
gs = 256 / (g - 1);
bs = 256 / (b - 1);
for (i = 0; i < 256; i++) {
map->red[i] = (rs * ((i / (g * b)) % r)) * 255;
map->green[i] = (gs * ((i / b) % g)) * 255;
@@ -156,7 +156,7 @@ void blit2FB(void *fbbuff,
xc = (pic_xs > scr_xs) ? scr_xs : pic_xs;
yc = (pic_ys > scr_ys) ? scr_ys : pic_ys;
unsigned int stride = CFrameBuffer::getInstance()->getStride();
switch(cpp){
@@ -179,7 +179,7 @@ void blit2FB(void *fbbuff,
}
}
void clearFB(int bpp, int cpp)
void clearFB(int /*bpp*/, int cpp)
{
int x,y;
getCurrentRes(&x,&y);
@@ -240,17 +240,17 @@ inline unsigned char make8color(unsigned char r, unsigned char g, unsigned char
inline unsigned short make15color(unsigned char r, unsigned char g, unsigned char b)
{
return (
return (
(((b >> 3) & 31) << 10) |
(((g >> 3) & 31) << 5) |
((r >> 3) & 31) );
}
inline unsigned short make16color(uint32_t r, uint32_t g, uint32_t b,
uint32_t rl, uint32_t ro,
uint32_t gl, uint32_t go,
uint32_t bl, uint32_t bo,
uint32_t tl, uint32_t to)
inline unsigned short make16color(uint32_t r, uint32_t g, uint32_t b,
uint32_t rl, uint32_t ro,
uint32_t gl, uint32_t go,
uint32_t bl, uint32_t bo,
uint32_t /*tl*/, uint32_t /*to*/)
{
return (
// ((0xFF >> (8 - tl)) << to) |
@@ -268,7 +268,7 @@ void* convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, in
unsigned int *i_fbbuff;
unsigned long count = x*y;
uint32_t rl, ro, gl, go, bl, bo, tl, to;
struct fb_var_screeninfo *var;
var = CFrameBuffer::getInstance()->getScreenInfo();
rl = (var->red).length;
@@ -279,7 +279,7 @@ void* convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, in
bo = (var->blue).offset;
tl = (var->transp).length;
to = (var->transp).offset;
switch(bpp)
{
case 8:

View File

@@ -33,7 +33,7 @@ int fh_gif_id(const char *name)
return(0);
}
inline void m_rend_gif_decodecolormap(unsigned char *cmb,unsigned char *rgbb,ColorMapObject *cm,int s,int l)
inline void m_rend_gif_decodecolormap(unsigned char *cmb,unsigned char *rgbb,ColorMapObject *cm,int /*s*/,int l)
{
GifColorType *cmentry;
int i;
@@ -45,7 +45,7 @@ inline void m_rend_gif_decodecolormap(unsigned char *cmb,unsigned char *rgbb,Col
*(rgbb++)=cmentry->Blue;
}
}
int fh_gif_load(const char *name,unsigned char **buffer,int* xp,int* yp)
int fh_gif_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/)
{
int px,py,i,ibxs;
int j;
@@ -114,13 +114,13 @@ int fh_gif_load(const char *name,unsigned char **buffer,int* xp,int* yp)
break;
default:
break;
}
}
}
while( rt!= TERMINATE_RECORD_TYPE );
DGifCloseFile(gft);
return(FH_ERROR_OK);
}
int fh_gif_getsize(const char *name,int *x,int *y, int wanted_width, int wanted_height)
int fh_gif_getsize(const char *name,int *x,int *y, int /*wanted_width*/, int /*wanted_height*/)
{
int px,py;
GifFileType *gft;
@@ -151,7 +151,7 @@ int fh_gif_getsize(const char *name,int *x,int *y, int wanted_width, int wanted_
break;
default:
break;
}
}
}
while( rt!= TERMINATE_RECORD_TYPE );
DGifCloseFile(gft);

View File

@@ -24,7 +24,7 @@ int fh_png_id(const char *name)
}
int fh_png_load(const char *name,unsigned char **buffer,int* xp,int* yp)
int fh_png_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/)
{
static const png_color_16 my_background = {0, 0, 0, 0, 0};
@@ -48,14 +48,14 @@ int fh_png_load(const char *name,unsigned char **buffer,int* xp,int* yp)
if(info_ptr == NULL)
{
png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);
fclose(fh);
fclose(fh);
return(FH_ERROR_FORMAT);
}
if(setjmp(png_ptr->jmpbuf))
{
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
fclose(fh);
fclose(fh);
return(FH_ERROR_FORMAT);
}
@@ -116,7 +116,7 @@ int fh_png_load(const char *name,unsigned char **buffer,int* xp,int* yp)
return(FH_ERROR_OK);
}
int fh_png_getsize(const char *name,int *x,int *y, int wanted_width, int wanted_height)
int fh_png_getsize(const char *name,int *x,int *y, int /*wanted_width*/, int /*wanted_height*/)
{
png_structp png_ptr;
png_infop info_ptr;
@@ -135,14 +135,14 @@ int fh_png_getsize(const char *name,int *x,int *y, int wanted_width, int wanted_
if(info_ptr == NULL)
{
png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);
fclose(fh);
fclose(fh);
return(FH_ERROR_FORMAT);
}
if(setjmp(png_ptr->jmpbuf))
{
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
fclose(fh);
fclose(fh);
return(FH_ERROR_FORMAT);
}