From patchwork Tue Feb 1 14:53:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 81327 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1F861B708B for ; Wed, 2 Feb 2011 02:33:57 +1100 (EST) Received: from localhost ([127.0.0.1]:34541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkIEr-0006yV-TB for incoming@patchwork.ozlabs.org; Tue, 01 Feb 2011 10:33:53 -0500 Received: from [140.186.70.92] (port=58659 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkHh4-0002M8-E3 for qemu-devel@nongnu.org; Tue, 01 Feb 2011 09:59:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkHbl-0004Fw-7N for qemu-devel@nongnu.org; Tue, 01 Feb 2011 09:53:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkHbk-0004Fl-Tp for qemu-devel@nongnu.org; Tue, 01 Feb 2011 09:53:29 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p11ErP5S030409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Feb 2011 09:53:25 -0500 Received: from red-feather.redhat.com (ovpn-113-98.phx2.redhat.com [10.3.113.98]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p11ErNcu022735; Tue, 1 Feb 2011 09:53:24 -0500 From: Jes.Sorensen@redhat.com To: qemu-devel@nongnu.org Date: Tue, 1 Feb 2011 15:53:23 +0100 Message-Id: <1296572003-13732-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: blauwirbel@gmail.com, kraxel@redhat.com Subject: [Qemu-devel] [PATCH] Make spice dummy functions inline to fix calls not checking return values X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: 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 --- 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 48239c3..920d501 100644 --- a/ui/qemu-spice.h +++ b/ui/qemu-spice.h @@ -42,8 +42,16 @@ void do_info_spice(Monitor *mon, QObject **ret_data); #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; +} #endif /* CONFIG_SPICE */