qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 1/8] ui/vnc-enc-tight: add abort() for unexpected defa


From: Alex Bennée
Subject: [Qemu-devel] [RFC 1/8] ui/vnc-enc-tight: add abort() for unexpected default
Date: Mon, 19 Sep 2016 16:51:32 +0100

When enabling the sanitizer build it will complain about control
reaching a non-void function. Normally the compiler should detect that
there is only one possible exit given a static VNC_SERVER_FB_BYTES.

As we should never get here I added an abort() rather than a default
return value.

Signed-off-by: Alex Bennée <address@hidden>
---
 ui/vnc-enc-tight.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index 49df85e..9e4d254 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -710,6 +710,8 @@ static bool check_solid_tile(VncState *vs, int x, int y, 
int w, int h,
     switch (VNC_SERVER_FB_BYTES) {
     case 4:
         return check_solid_tile32(vs, x, y, w, h, color, samecolor);
+    default:
+        abort();
     }
 }
 
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]