From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id 08B673B5 for ; Wed, 4 Mar 2015 10:59:32 +0100 (CET) Received: by widem10 with SMTP id em10so29328711wid.1 for ; Wed, 04 Mar 2015 01:59:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=dbO1vA5ItwWP9+7uSFvqQBfxUiCWrnaBj82cfdSVADA=; b=hgC0T6gTnhCSEDnU3SNOm7YjGEQ8LZJZ0+rZzRrg/3qLPRF137fBVYAQS1K6GC0dOl DpssjMmFwrBvq4yjqzS6AoX6QfIC12ezRkSXPZAtDz1bos1Eajwo/1KV8IKOA1NBz2Ev vPVVOwntWkp0zEWxq+D/mPc5EQiQE7D21hns4DjEzmhykQBtTtOiWQv/NfkN7OJcUJew GlWfQnETlYTrjBHspKq3v0HXSh9AI21LjzkftUD78fAPfHi1AXJ9ufpM5mv2ssp4NtQy r4cFQh4F7aKVbVf1Z34jCJczfGPxYzriVHgIIYhzxW4M/Zsr/aJvC0li5qDsfjeYC/Gp W/lA== X-Gm-Message-State: ALoCoQmkLrfSeUMZkfZzMHka2EcGJ6cemSJWXwuQ8/tcrUwt+69TP/4dNuxSeAGDcog5LkXvxhQJ X-Received: by 10.194.61.65 with SMTP id n1mr6164739wjr.53.1425463171813; Wed, 04 Mar 2015 01:59:31 -0800 (PST) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id hv5sm5204005wjb.16.2015.03.04.01.59.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 01:59:31 -0800 (PST) Message-ID: <54F6D785.3040305@6wind.com> Date: Wed, 04 Mar 2015 10:59:33 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: Thomas Monjalon , dev@dpdk.org References: <1425396230-13379-1-git-send-email-thomas.monjalon@6wind.com> <1425396230-13379-2-git-send-email-thomas.monjalon@6wind.com> In-Reply-To: <1425396230-13379-2-git-send-email-thomas.monjalon@6wind.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 1/7] mempool: fix build with debug enabled X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2015 09:59:32 -0000 Hi Thomas, On 03/03/2015 04:23 PM, Thomas Monjalon wrote: > error: format ‘%p’ expects argument of type ‘void *’, > but argument 5 has type ‘const struct rte_mempool *’ [-Werror=format=] > > mp type is (const struct rte_mempool *) and must be casted into a simpler > type to be printed. I was a bit surprised to see this warning although the standard says: The argument shall be a pointer to void. The value of the pointer is converted to a sequence of printing wide characters, in an implementation-defined manner. But I think we often do this in dpdk, without any warning: struct foo_s *foo = ...; printf("%p\n", foo); After some search, the reason why you get a warning here is that you compile a C file that includes this header with the "-pedantic" flag. So, I think doing this fix is justified for header files as we cannot predict which options are used by the user of these headers. So: Acked-by: Olivier Matz