From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 49E0B30D for ; Sat, 21 Jun 2014 02:02:35 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 20 Jun 2014 17:02:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,518,1400050800"; d="scan'208";a="551147486" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga001.fm.intel.com with ESMTP; 20 Jun 2014 17:02:44 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.58]) by IRSMSX102.ger.corp.intel.com ([169.254.2.105]) with mapi id 14.03.0123.003; Sat, 21 Jun 2014 01:02:43 +0100 From: "Richardson, Bruce" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v3] EAL: fix usage of printf-like functions Thread-Index: AQHPjOBH/qptDaY1EUCK9yU2UJlx8pt6nG2AgAARboA= Date: Sat, 21 Jun 2014 00:02:43 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B01AA38F5A@IRSMSX103.ger.corp.intel.com> References: <1403307270-28308-1-git-send-email-bruce.richardson@intel.com> <20140620165803.71f68c43@nehalam.linuxnetplumber.net> In-Reply-To: <20140620165803.71f68c43@nehalam.linuxnetplumber.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v3] EAL: fix usage of printf-like functions 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: Sat, 21 Jun 2014 00:02:35 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Friday, June 20, 2014 4:58 PM > To: Richardson, Bruce > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3] EAL: fix usage of printf-like function= s >=20 > On Sat, 21 Jun 2014 00:34:30 +0100 > Bruce Richardson wrote: >=20 > > + (int)(strnlen(buf, sizeof(buf)) - sizeof("_config")), >=20 > minor nit, paren not needed here > (int)strnlen(buf, sizeof...) >=20 > better yet change rte_snprintf() to take a size_t to make it compatiable = with > snprintf Removing the paren still gives the same error, as the whole expression need= s to be int, not just the first part of it.=20 As for acception size_t vs int, the errors about the type come from the com= piler based on its understanding of the printf format, not from anything we= have done with rte_snprintf, so I'm not sure how we could change things to= make size_t values acceptable here. /Bruce