From patchwork Thu Feb 24 16:04:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 210 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:40:54 -0000 Delivered-To: patches@linaro.org Received: by 10.224.19.208 with SMTP id c16cs353467qab; Thu, 24 Feb 2011 08:04:35 -0800 (PST) Received: by 10.213.22.67 with SMTP id m3mr807769ebb.68.1298563473844; Thu, 24 Feb 2011 08:04:33 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id w11si22567544eeh.26.2011.02.24.08.04.31 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Feb 2011 08:04:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1Psdfy-0005ne-E8; Thu, 24 Feb 2011 16:04:22 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: Corentin Chary , Anthony Liguori , patches@linaro.org Subject: [PATCH] ui/vnc-enc-tight.c: Fix compile failure if CONFIG_VNC_JPEG not defined Date: Thu, 24 Feb 2011 16:04:22 +0000 Message-Id: <1298563462-22271-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.3 Add some missing #ifdefs to fix compilation failures in the !CONFIG_VNC_JPEG case introduced by commit ce702e93. Signed-off-by: Peter Maydell --- ui/vnc-enc-tight.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 5933394..2522936 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -1536,8 +1536,10 @@ static int send_sub_rect(VncState *vs, int x, int y, int w, int h) uint32_t bg = 0, fg = 0; int colors; int ret = 0; +#ifdef CONFIG_VNC_JPEG bool force_jpeg = false; bool allow_jpeg = true; +#endif vnc_framebuffer_update(vs, x, y, w, h, vs->tight.type); @@ -1711,6 +1713,7 @@ static int tight_send_framebuffer_update(VncState *vs, int x, int y, vs->tight.pixel24 = false; } +#ifdef CONFIG_VNC_JPEG if (vs->tight.quality != (uint8_t)-1) { double freq = vnc_update_freq(vs, x, y, w, h); @@ -1718,6 +1721,7 @@ static int tight_send_framebuffer_update(VncState *vs, int x, int y, return send_rect_simple(vs, x, y, w, h, false); } } +#endif if (w * h < VNC_TIGHT_MIN_SPLIT_RECT_SIZE) { return send_rect_simple(vs, x, y, w, h, true);