Cast font->index[i] to wchar_t for the comparison.

This fixes following sign-compare warning:

psplash-fb.c: In function 'psplash_font_glyph':
psplash-fb.c:452:33: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]

Signed-off-by: Richard Leitner <richard.leit...@skidata.com>
---
 psplash-fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/psplash-fb.c b/psplash-fb.c
index 38cd6a4..cdcbc19 100644
--- a/psplash-fb.c
+++ b/psplash-fb.c
@@ -449,7 +449,7 @@ psplash_font_glyph (const PSplashFont *font, wchar_t wc, 
u_int32_t **bitmap)
     {
       for (i = font->offset[wc & mask]; font->index[i]; i += 2)
        {
-         if ((font->index[i] & ~mask) == (wc & ~mask))
+         if ((wchar_t)(font->index[i] & ~mask) == (wc & ~mask))
            {
              if (bitmap != NULL)
                *bitmap = &font->content[font->index[i+1]];
-- 
2.1.4

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to