From patchwork Mon Sep 19 15:51:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 76561 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1032475qgf; Mon, 19 Sep 2016 08:59:48 -0700 (PDT) X-Received: by 10.55.23.193 with SMTP id 62mr30509384qkx.218.1474300788640; Mon, 19 Sep 2016 08:59:48 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u5si17822568qkb.5.2016.09.19.08.59.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 19 Sep 2016 08:59:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm0yy-0001j9-3A for patch@linaro.org; Mon, 19 Sep 2016 11:59:48 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4A7Cc7BZEo/rJ+x45wo7VXP3C9VC/R8HhhrQQMHA35k=; b=hW0luRIOHETHecRa+0O8FGpOoC5/RYY/1VQtR4Y6XwFjwr+QYppSQXAzZjAmD5+IiM ZU8/3BTv5D5rVfrHYkj9i1pOWFRpswqkd1qr81k8OVliAQ6zXLrzKgw/yqOByvHjOc2A Gbm7sjaLzXiticf+/qGiQ/3T0Z8ujJfogPDvE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4A7Cc7BZEo/rJ+x45wo7VXP3C9VC/R8HhhrQQMHA35k=; b=eXWEgCZowuE4CgMW/pcTYLcp5M2GZ4LFtaTlvKs3DnkgBrcUCX2DnQuS+ijlijbT+J 57JIioV1vUzLIt1NiMQwzqK5ShO6WcbfHSKPvEN3HZjVcb3rNysOscGUO3JVD54k80G9 jq1PqJe052NCgYT4EaswCmEolJJSmdh/t/yRkMJQqgJXqTwW3HhAJVY8xa6bFeRvG17Q duhNosPfNG55MUS5EHPqfNNg6I01Z6AxT1cnxk1my2XgcsCByfeJCs9L0plPtnX/01vw I7SmjxKrgu+0JxH+T0H3nbzgNF665vHdnWoqt1OsRLcE01EM74XWY6pRyZlHdv4h6SVw nSdQ== X-Gm-Message-State: AE9vXwN/jCRWISsPfdGAgFn7JV/5p0bY49NAGqrcdM9ynKjMPWtTQLUcp+Jn6XpaeuXYt3f9 X-Received: by 10.28.150.145 with SMTP id y139mr11009772wmd.112.1474300316223; Mon, 19 Sep 2016 08:51:56 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id bj8sm23665951wjc.49.2016.09.19.08.51.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2016 08:51:53 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 532A83E05B6; Mon, 19 Sep 2016 16:51:53 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, pbonzini@redhat.com, cota@braap.org, stefanha@redhat.com, kwolf@redhat.com Date: Mon, 19 Sep 2016 16:51:32 +0100 Message-Id: <20160919155139.28371-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160919155139.28371-1-alex.bennee@linaro.org> References: <20160919155139.28371-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.47 Subject: [Qemu-devel] [RFC 1/8] ui/vnc-enc-tight: add abort() for unexpected default X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, peter.maydell@linaro.org, claudio.fontana@huawei.com, nikunj@linux.vnet.ibm.com, jan.kiszka@siemens.com, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, Gerd Hoffmann , serge.fdrv@gmail.com, bobby.prani@gmail.com, rth@twiddle.net, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(+) -- 2.9.3 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(); } }