From patchwork Tue May 3 15:06:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 93823 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 70C381007D1 for ; Wed, 4 May 2011 01:07:39 +1000 (EST) Received: from localhost ([::1]:55780 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHHCH-0001jg-9Q for incoming@patchwork.ozlabs.org; Tue, 03 May 2011 11:07:33 -0400 Received: from eggs.gnu.org ([140.186.70.92]:56413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHHBq-0001YT-5V for qemu-devel@nongnu.org; Tue, 03 May 2011 11:07:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHHBh-0004a1-JN for qemu-devel@nongnu.org; Tue, 03 May 2011 11:07:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHHBh-0004Ze-6J for qemu-devel@nongnu.org; Tue, 03 May 2011 11:06:57 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p43F6uAr008434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 3 May 2011 11:06:56 -0400 Received: from rincewind.home.kraxel.org (vpn1-6-105.ams2.redhat.com [10.36.6.105]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p43F6saX000440; Tue, 3 May 2011 11:06:54 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id E3563425AF; Tue, 3 May 2011 17:06:52 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 3 May 2011 17:06:49 +0200 Message-Id: <1304435212-10575-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1304435212-10575-1-git-send-email-kraxel@redhat.com> References: <1304435212-10575-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Jes Sorensen , Gerd Hoffmann Subject: [Qemu-devel] [PATCH 1/4] Make spice dummy functions inline to fix calls not checking return values X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jes Sorensen qemu_spice_set_passwd() and qemu_spice_set_pw_expire() dummy functions needs to be inline, in order to handle the case where they are called without checking the return value. Signed-off-by: Jes Sorensen Signed-off-by: Gerd Hoffmann --- ui/qemu-spice.h | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/qemu-spice.h b/ui/qemu-spice.h index 916e5dc..3c6f1fe 100644 --- a/ui/qemu-spice.h +++ b/ui/qemu-spice.h @@ -47,8 +47,16 @@ CharDriverState *qemu_chr_open_spice(QemuOpts *opts); #else /* CONFIG_SPICE */ #define using_spice 0 -#define qemu_spice_set_passwd(_p, _f1, _f2) (-1) -#define qemu_spice_set_pw_expire(_e) (-1) +static inline int qemu_spice_set_passwd(const char *passwd, + bool fail_if_connected, + bool disconnect_if_connected) +{ + return -1; +} +static inline int qemu_spice_set_pw_expire(time_t expires) +{ + return -1; +} static inline int qemu_spice_migrate_info(const char *h, int p, int t, const char *s) { return -1; }