> -----Original Message----- > From: Stephen Hemminger [mailto:stephen at networkplumber.org] > Sent: Friday, June 20, 2014 4:58 PM > To: Richardson, Bruce > Cc: dev at 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 at 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