提交 4a75cb85 编写于 作者: T Tomi Valkeinen

OMAPFB: remove compiler warnings when CONFIG_BUG=n

If CONFIG_BUG is not enabled, BUG() does not stop the execution. Many
places in code expect the execution to stop, and this causes compiler
warnings about uninitialized variables and returning from a non-void
function without a return value.

This patch fixes the warnings by initializing the variables and
returning properly after BUG() lines. However, the behaviour is still
undefined after the BUG, but this is the choice the user makes when
using CONFIG_BUG=n.
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 c6eee968
......@@ -179,6 +179,7 @@ static unsigned omapfb_get_vrfb_offset(const struct omapfb_info *ofbi, int rot)
break;
default:
BUG();
return 0;
}
offset *= vrfb->bytespp;
......
......@@ -166,6 +166,7 @@ static inline struct omapfb_display_data *get_display_data(
/* This should never happen */
BUG();
return NULL;
}
static inline void omapfb_lock(struct omapfb2_device *fbdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册