Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MkbX2-0003P9-Pz for qemu-devel@nongnu.org; Mon, 07 Sep 2009 06:33:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MkbWw-0003IS-85 for qemu-devel@nongnu.org; Mon, 07 Sep 2009 06:33:06 -0400 Received: from [199.232.76.173] (port=34295 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkbWv-0003Hz-MC for qemu-devel@nongnu.org; Mon, 07 Sep 2009 06:33:01 -0400 Received: from tx2ehsobe003.messaging.microsoft.com ([65.55.88.13]:26292 helo=TX2EHSOBE005.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1MkbWv-0003zw-6E for qemu-devel@nongnu.org; Mon, 07 Sep 2009 06:33:01 -0400 Received: from mail193-tx2 (localhost.localdomain [127.0.0.1]) by mail193-tx2-R.bigfish.com (Postfix) with ESMTP id 809C184040F for ; Mon, 7 Sep 2009 10:32:58 +0000 (UTC) Received: from ausb3extmailp01.amd.com (unknown [163.181.251.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail193-tx2.bigfish.com (Postfix) with ESMTP id 0E512E48079 for ; Mon, 7 Sep 2009 10:32:56 +0000 (UTC) Received: from ausb3twp01.amd.com ([163.181.250.37]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n87AWqVC022118 for ; Mon, 7 Sep 2009 05:32:55 -0500 Received: from sausexbh2.amd.com (SAUSEXBH2.amd.com [163.181.22.102]) by ausb3twp01.amd.com (Tumbleweed MailGate 3.7.0) with ESMTP id 23B8D10284CF for ; Mon, 7 Sep 2009 05:32:49 -0500 (CDT) From: Christoph Egger Date: Mon, 7 Sep 2009 12:32:39 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_HFOpKZUYzMenXZc" Message-ID: <200909071232.39682.Christoph.Egger@amd.com> Subject: [Qemu-devel] [PATCH] fix warnings List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --Boundary-00=_HFOpKZUYzMenXZc Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch fixes the warnings on NetBSD: ./audio/audio.h:150: warning: redundant redeclaration of 'popcount' /usr/include/strings.h:57: warning: previous declaration of 'popcount' was here Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_HFOpKZUYzMenXZc Content-Type: text/x-diff; charset="iso 8859-15"; name="qemu_audio_warningfix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="qemu_audio_warningfix.diff" diff --git a/audio/audio.c b/audio/audio.c index c067afb..822ca04 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -107,6 +107,7 @@ struct mixeng_volume nominal_volume = { #endif }; +#if !defined(__NetBSD__) /* http://www.df.lth.se/~john_e/gems/gem002d.html */ /* http://www.multi-platforms.com/Tips/PopCount.htm */ uint32_t popcount (uint32_t u) @@ -118,6 +119,7 @@ uint32_t popcount (uint32_t u) u = ( u&0x0000ffff) + (u>>16); return u; } +#endif inline uint32_t lsbindex (uint32_t u) { diff --git a/audio/audio.h b/audio/audio.h index fda2af3..54024dc 100644 --- a/audio/audio.h +++ b/audio/audio.h @@ -147,7 +147,11 @@ static inline void *advance (void *p, int incr) return (d + incr); } +#if defined(__NetBSD__) +#define popcount(u) popcount32(u) +#else uint32_t popcount (uint32_t u); +#endif uint32_t lsbindex (uint32_t u); #ifdef __GNUC__ --Boundary-00=_HFOpKZUYzMenXZc--