From patchwork Mon Sep 7 10:32:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Egger X-Patchwork-Id: 33079 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 bilbo.ozlabs.org (Postfix) with ESMTPS id CD096B70B0 for ; Mon, 7 Sep 2009 20:36:26 +1000 (EST) Received: from localhost ([127.0.0.1]:42030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mkba9-0005W5-9r for incoming@patchwork.ozlabs.org; Mon, 07 Sep 2009 06:36:21 -0400 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-R.bigfish.com (10.9.14.248) by TX2EHSOBE005.bigfish.com (10.9.40.25) with Microsoft SMTP Server id 8.1.340.0; Mon, 7 Sep 2009 10:32:58 +0000 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) X-SpamScore: 4 X-BigFish: VPS4(zza594izz1202hzzz32i247h6bh203h34h43j62h) X-Spam-TCS-SCL: 1:0 X-FB-SS: 5, Received: by mail193-tx2 (MessageSwitch) id 1252319577239013_16361; Mon, 7 Sep 2009 10:32:57 +0000 (UCT) 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 X-WSS-ID: 0KPLJYQ-01-0U6-02 X-M-MSG: 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) Received: from sausexmb5.amd.com ([163.181.49.129]) by sausexbh2.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 7 Sep 2009 05:32:51 -0500 Received: from SDRSEXMB1.amd.com ([172.20.3.116]) by sausexmb5.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 7 Sep 2009 05:32:51 -0500 Received: from seurexmb1.amd.com ([165.204.9.130]) by SDRSEXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 7 Sep 2009 12:32:49 +0200 Received: from donner.osrc.amd.com ([165.204.15.15]) by seurexmb1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 7 Sep 2009 12:32:40 +0200 From: Christoph Egger To: qemu-devel@nongnu.org Date: Mon, 7 Sep 2009 12:32:39 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Message-ID: <200909071232.39682.Christoph.Egger@amd.com> X-OriginalArrivalTime: 07 Sep 2009 10:32:41.0102 (UTC) FILETIME=[87177AE0:01CA2FA6] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ Subject: [Qemu-devel] [PATCH] fix warnings 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 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 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__