DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3] EAL: fix usage of printf-like functions
Date: Sat, 21 Jun 2014 00:02:43 +0000	[thread overview]
Message-ID: <59AF69C657FD0841A61C55336867B5B01AA38F5A@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <20140620165803.71f68c43@nehalam.linuxnetplumber.net>

> -----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 functions
> 
> On Sat, 21 Jun 2014 00:34:30 +0100
> Bruce Richardson <bruce.richardson@intel.com> wrote:
> 
> > +			(int)(strnlen(buf, sizeof(buf)) - sizeof("_config")),
> 
> minor nit, paren not needed here
> 			(int)strnlen(buf, sizeof...)
> 
> 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 needs to be int, not just the first part of it. 
As for acception size_t vs int, the errors about the type come from the compiler 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

  reply	other threads:[~2014-06-21  0:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 18:42 [dpdk-dev] [PATCH] EAL: add format(printf) attrib. to appropriate fns Bruce Richardson
2014-06-19  8:37 ` Thomas Monjalon
2014-06-19 18:21   ` [dpdk-dev] [PATCH v2] EAL: fix usage of printf-like functions Bruce Richardson
2014-06-20  8:24     ` De Lara Guarch, Pablo
2014-06-20 23:34       ` [dpdk-dev] [PATCH v3] " Bruce Richardson
2014-06-20 23:58         ` Stephen Hemminger
2014-06-21  0:02           ` Richardson, Bruce [this message]
2014-06-27  0:48         ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59AF69C657FD0841A61C55336867B5B01AA38F5A@IRSMSX103.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).