[dpdk-dev] [PATCH 1/3] stringfns: remove rte_snprintf

Olivier MATZ olivier.matz at 6wind.com
Wed Jun 25 09:55:47 CEST 2014


Hi Bruce,

On 06/24/2014 08:00 PM, Richardson, Bruce wrote:
>> I want to get it out now rather than some 2 year life cycle.
>> The issue was discussed and marking it as deprecated breaks the build.
>> Alternate is removing all instances and adding:
>>
>> #define rte_snprintf	snprintf
>>
>> in header file for user compatiablity.
>
> We can remove it from all our apps and then mark as deprecated and all our code would still build.
> An interesting point I'd never thought of is, is it right for us to force user apps to treat all warnings as errors? Perhaps we should also consider removing -Werror from the CFLAGS when using rte.extapp.mk.

I don't understand why removing a function like rte_snprintf()
in a new version of DPDK would be a problem. Yes, it would break
the build of external applications, but that's the best way to fix
the problem in the external code. Adding a compatibility layer
just delays the issue. Maybe having a line about this in a "release
note" or a "porting guide" would be enough? It could even references
the commit id, showing how to solve the issue.

About the -Werror flag, I would say that removing it is not a good
idea. From my experience, many issues are pointed out by warnings,
and forcing the compiler to stop on warning helps to have better
code quality.

Regards,
Olivier



More information about the dev mailing list