From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: Gerd Hoffmann 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> Subject: [Qemu-devel] [PATCH 1/4] Make spice dummy functions inline to fix calls not checking return values List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jes Sorensen , Gerd Hoffmann 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; } -- 1.7.1