drivers/video/videomodes.c: fix GCC 4.6 build warning
Fix: videomodes.c: In function 'video_get_params': videomodes.c:162:13: warning: variable 't' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
parent
b633741bcd
commit
40ac78a949
|
@ -159,15 +159,18 @@ video_search_param (char *start, char *param)
|
||||||
int video_get_params (struct ctfb_res_modes *pPar, char *penv)
|
int video_get_params (struct ctfb_res_modes *pPar, char *penv)
|
||||||
{
|
{
|
||||||
char *p, *s, *val_s;
|
char *p, *s, *val_s;
|
||||||
int i = 0, t;
|
int i = 0;
|
||||||
int bpp;
|
int bpp;
|
||||||
int mode;
|
int mode;
|
||||||
|
|
||||||
/* first search for the environment containing the real param string */
|
/* first search for the environment containing the real param string */
|
||||||
s = penv;
|
s = penv;
|
||||||
if ((p = getenv (s)) != NULL) {
|
|
||||||
|
if ((p = getenv (s)) != NULL)
|
||||||
s = p;
|
s = p;
|
||||||
}
|
|
||||||
/* in case of the bootargs line, we have to start
|
/*
|
||||||
|
* in case of the bootargs line, we have to start
|
||||||
* after "video=ctfb:"
|
* after "video=ctfb:"
|
||||||
*/
|
*/
|
||||||
i = video_search_param (s, "video=ctfb:");
|
i = video_search_param (s, "video=ctfb:");
|
||||||
|
@ -177,19 +180,22 @@ int video_get_params (struct ctfb_res_modes *pPar, char *penv)
|
||||||
}
|
}
|
||||||
/* search for mode as a default value */
|
/* search for mode as a default value */
|
||||||
p = s;
|
p = s;
|
||||||
t = 0;
|
|
||||||
mode = 0; /* default */
|
mode = 0; /* default */
|
||||||
|
|
||||||
while ((i = video_get_param_len (p, ',')) != 0) {
|
while ((i = video_get_param_len (p, ',')) != 0) {
|
||||||
GET_OPTION ("mode:", mode)
|
GET_OPTION ("mode:", mode)
|
||||||
p += i;
|
p += i;
|
||||||
if (*p != 0)
|
if (*p != 0)
|
||||||
p++; /* skip ',' */
|
p++; /* skip ',' */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode >= RES_MODES_COUNT)
|
if (mode >= RES_MODES_COUNT)
|
||||||
mode = 0;
|
mode = 0;
|
||||||
|
|
||||||
*pPar = res_mode_init[mode]; /* copy default values */
|
*pPar = res_mode_init[mode]; /* copy default values */
|
||||||
bpp = 24 - ((mode % 3) * 8);
|
bpp = 24 - ((mode % 3) * 8);
|
||||||
p = s; /* restart */
|
p = s; /* restart */
|
||||||
|
|
||||||
while ((i = video_get_param_len (p, ',')) != 0) {
|
while ((i = video_get_param_len (p, ',')) != 0) {
|
||||||
GET_OPTION ("x:", pPar->xres)
|
GET_OPTION ("x:", pPar->xres)
|
||||||
GET_OPTION ("y:", pPar->yres)
|
GET_OPTION ("y:", pPar->yres)
|
||||||
|
|
Loading…
Reference in New Issue