Skip to contentSkip to conversation

fb: fix warning: no return statement in function returning non-void

PATCH New Anton Vorontsov 1 participant 1 message Feb 5, 2008 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fb: fix warning: no return statement in function returning non-void

Warning is reproducible with selected FB_CFB_REV_PIXELS_IN_BYTE.

CC drivers/video/sysfillrect.o
In file included from drivers/video/sysfillrect.c:18:
drivers/video/fb_draw.h: In function ‘fb_rev_pixels_in_long’:
drivers/video/fb_draw.h:94: warning: no return statement in function returning non-void
CC drivers/video/syscopyarea.o
In file included from drivers/video/syscopyarea.c:22:
drivers/video/fb_draw.h: In function ‘fb_rev_pixels_in_long’:
drivers/video/fb_draw.h:94: warning: no return statement in function returning non-void

---
 drivers/video/fb_draw.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/video/fb_draw.h +1 -0
index cdafbe1..a2a0618 100644
@@ -91,6 +91,7 @@ static inline unsigned long fb_rev_pixels_in_long(unsigned long val,
 		val = comp(val >> 2, val << 2, REV_PIXELS_MASK2);
 	if (bswapmask & 3)
 		val = comp(val >> 4, val << 4, REV_PIXELS_MASK4);
+	return val;
 }
 
 static inline u32 fb_shifted_pixels_mask_u32(u32 index, u32 bswapmask)
Signature · 1 line
1.5.2.2