From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch] fix prototypes in qemu posix code Date: Sun, 07 Sep 2008 09:31:50 +0300 Message-ID: <48C37556.2070401@qumranet.com> References: <48C138D8.9030207@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Jes Sorensen Return-path: Received: from il.qumranet.com ([212.179.150.194]:28453 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751713AbYIGGbw (ORCPT ); Sun, 7 Sep 2008 02:31:52 -0400 In-Reply-To: <48C138D8.9030207@sgi.com> Sender: kvm-owner@vger.kernel.org List-ID: Jes Sorensen wrote: > Hi, > > Small patch to eliminate some compiler warnings. > > Cheers, > Jes > #include "exec-all.h" > #else > #define kvm_enabled() 0 > -#define qemu_kvm_aio_start() ((void)0) > -#define qemu_kvm_aio_end() ((void)0) > -#define qemu_kvm_aio_wait() ((void)0) > -#define qemu_kvm_aio_poll() ((void)0) > +#define qemu_kvm_aio_wait() do{}while(0) > +#define qemu_kvm_aio_poll() do{}while(0) > +void qemu_kvm_aio_wait_start(void); > +void qemu_kvm_aio_wait_end(void); Better to have this as an inline function; that's the best way to avoid misuse. -- error compiling committee.c: too many arguments to function