From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9Vst-0005xv-LL for qemu-devel@nongnu.org; Fri, 09 Jan 2015 04:29:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9Vsq-00016G-EW for qemu-devel@nongnu.org; Fri, 09 Jan 2015 04:29:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9Vsq-00015w-7V for qemu-devel@nongnu.org; Fri, 09 Jan 2015 04:29:32 -0500 From: Gerd Hoffmann Date: Fri, 9 Jan 2015 10:28:30 +0100 Message-Id: <1420795717-28966-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1420795717-28966-1-git-send-email-kraxel@redhat.com> References: <1420795717-28966-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/8] ui: Make qemu_default_pixman_format() return 0 on unsupported formats List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori From: Benjamin Herrenschmidt In order to remove the logic for detecting supported shared pixmap formats from device models, make qemu_default_pixman_format() capable for failing by returning 0 which is not a possible format value rather than asserting. Signed-off-by: Benjamin Herrenschmidt --- ui/qemu-pixman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/qemu-pixman.c b/ui/qemu-pixman.c index 1f6fea5..6a889e9 100644 --- a/ui/qemu-pixman.c +++ b/ui/qemu-pixman.c @@ -84,7 +84,7 @@ pixman_format_code_t qemu_default_pixman_format(int bpp, bool native_endian) break; } } - g_assert_not_reached(); + return 0; } int qemu_pixman_get_type(int rshift, int gshift, int bshift) -- 1.8.3.1