compiler warnings in framebuffer drivers
PATCH 1/1 compiler warnings in framebuffer drivers
Hi,
this patch removes all those compiler warnings that were introduced with the anti-strtok patch some time ago. It's against kernel 2.4.15-pre4. I sent you similar ones but it seems they got lost. Which makes me
suspicious: is there something wrong with this patch that prevents it from being applied?
OK, additionally to adding some parentheses this patch corrects a minor issue by inserting code like this at appropriate places:
+ if (!*this_opt)
+ continue;
This lets the parameter parsing code skip over empty tokens, just like strtok did implicitely. It's purely cosmetic - I'd send you a patch without this 'feature', if you like.
Patch is untested, but at least it compiles. Please, apply.
René
drivers/video/acornfb.c +1 -1
@@ -1528,7 +1528,7 @@acornfb_init_fbinfo (); -while (opt =strsep (&options,"," )) { +while ((opt =strsep (&options,"," )) !=NULL ) {if (!*opt)continue ;
drivers/video/amifb.c +3 -1
@@ -1192,7 +1192,9 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) { +if (!*this_opt) +continue ;if (!strcmp (this_opt,"inverse" )) { amifb_inverse =1 ;fb_invert_cmaps ();
drivers/video/controlfb.c +1 -1
@@ -1423,7 +1423,7 @@if (!options || !*options)return ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!strncmp (this_opt,"font:" ,5 )) {char *p;int i;
drivers/video/cyberfb.c +3 -1
@@ -1022,7 +1022,9 @@return 0 ; } -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) { +if (!*this_opt) +continue ;if (!strcmp (this_opt,"inverse" )) { Cyberfb_inverse =1 ;fb_invert_cmaps ();
drivers/video/fm2fb.c +1 -1
@@ -430,7 +430,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!strncmp (this_opt,"pal" ,3 )) fm2fb_mode =FM2FB_MODE_PAL ;else if (!strncmp (this_opt,"ntsc" ,4 ))
drivers/video/igafb.c +1 -1
@@ -773,7 +773,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!strncmp (this_opt,"font:" ,5 )) {char *p;int i;
drivers/video/imsttfb.c +1 -1
@@ -1977,7 +1977,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!strncmp (this_opt,"font:" ,5 )) {char *p;int i;
drivers/video/macfb.c +1 -1
@@ -848,7 +848,7 @@if (!options || !*options)return ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!*this_opt)continue ;if (!strcmp (this_opt,"inverse" ))
drivers/video/matrox/matroxfb_base.c +1 -1
@@ -2372,7 +2372,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!*this_opt)continue ;dprintk ("matroxfb_setup: option %s\n" , this_opt);
drivers/video/platinumfb.c +1 -1
@@ -841,7 +841,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!strncmp (this_opt,"font:" ,5 )) {char *p;int i;
drivers/video/radeonfb.c +3 -1
@@ -642,7 +642,9 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) { +if (!*this_opt) +continue ;if (!strncmp (this_opt,"font:" ,5 )) {char *p;int i;
drivers/video/retz3fb.c +3 -1
@@ -1348,7 +1348,9 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) { +if (!*this_opt) +continue ;if (!strcmp (this_opt,"inverse" )) { z3fb_inverse =1 ;fb_invert_cmaps ();
drivers/video/riva/fbdev.c +3 -1
@@ -2045,7 +2045,9 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) { +if (!*this_opt) +continue ;if (!strncmp (this_opt,"font:" ,5 )) {char *p;int i;
drivers/video/sa1100fb.c +1 -1
@@ -2369,7 +2369,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!strncmp (this_opt,"bpp:" ,4 )) current_par.max_bpp =
drivers/video/sgivwfb.c +1 -1
@@ -863,7 +863,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!strncmp (this_opt,"font:" ,5 ))strcpy (fb_info.fontname, this_opt+5 ); }
drivers/video/sstfb.c +1 -1
@@ -1697,7 +1697,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!*this_opt)continue ;f_ddprintk ("option %s\n" , this_opt);
drivers/video/tdfxfb.c +3 -1
@@ -2086,7 +2086,9 @@if (!options || !*options)return ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) { +if (!*this_opt) +continue ;if (!strcmp (this_opt,"inverse" )) { inverse =1 ;fb_invert_cmaps ();
drivers/video/tgafb.c +1 -1
@@ -889,7 +889,7 @@int i;if (options && *options) { -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!*this_opt) {continue ; }if (!strncmp (this_opt,"font:" ,5 )) {
drivers/video/valkyriefb.c +1 -1
@@ -801,7 +801,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!strncmp (this_opt,"font:" ,5 )) {char *p;int i;
drivers/video/vesafb.c +1 -1
@@ -457,7 +457,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!*this_opt)continue ;if (!strcmp (this_opt,"inverse" ))
drivers/video/vfb.c +1 -1
@@ -382,7 +382,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!strncmp (this_opt,"font:" ,5 ))strcpy (fb_info.fontname, this_opt+5 ); }
drivers/video/vga16fb.c +1 -1
@@ -692,7 +692,7 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) {if (!*this_opt)continue ;if (!strncmp (this_opt,"font:" ,5 ))
drivers/video/virgefb.c +3 -1
@@ -1085,7 +1085,9 @@if (!options || !*options)return 0 ; -while (this_opt =strsep (&options,"," )) { +while ((this_opt =strsep (&options,"," )) !=NULL ) { +if (!*this_opt) +continue ;if (!strcmp (this_opt,"inverse" )) { Cyberfb_inverse =1 ;fb_invert_cmaps ();