From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm0sQ-00058z-1M for qemu-devel@nongnu.org; Mon, 19 Sep 2016 11:53:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bm0sL-000591-79 for qemu-devel@nongnu.org; Mon, 19 Sep 2016 11:53:00 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:36086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm0sL-00058e-1T for qemu-devel@nongnu.org; Mon, 19 Sep 2016 11:52:57 -0400 Received: by mail-wm0-f47.google.com with SMTP id w84so83468788wmg.1 for ; Mon, 19 Sep 2016 08:52:56 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Mon, 19 Sep 2016 16:51:32 +0100 Message-Id: <20160919155139.28371-2-alex.bennee@linaro.org> In-Reply-To: <20160919155139.28371-1-alex.bennee@linaro.org> References: <20160919155139.28371-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [RFC 1/8] ui/vnc-enc-tight: add abort() for unexpected default List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, pbonzini@redhat.com, cota@braap.org, stefanha@redhat.com, kwolf@redhat.com Cc: mttcg@listserver.greensocs.com, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, bobby.prani@gmail.com, nikunj@linux.vnet.ibm.com, mark.burton@greensocs.com, jan.kiszka@siemens.com, serge.fdrv@gmail.com, rth@twiddle.net, peter.maydell@linaro.org, claudio.fontana@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Gerd Hoffmann 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 --- 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