[dpdk-dev] [PATCH 5/5] Fix usage of fgets in various places

2015-02-25 Thread Panu Matilainen
On 02/24/2015 09:01 PM, Stephen Hemminger wrote: > On Tue, 24 Feb 2015 11:20:33 +0200 > Panu Matilainen wrote: > >> The tool is technically correct, even if loss of precision might be >> unlikely to occur in this context > > Overflow is not there in the code. > That is why I said "shooting

[dpdk-dev] [PATCH 5/5] Fix usage of fgets in various places

2015-02-24 Thread Panu Matilainen
On 02/23/2015 06:00 PM, Stephen Hemminger wrote: > On Mon, 23 Feb 2015 15:10:00 +0100 > Pawel Wodkowski wrote: > >> Declaration of fgets() is >> char *fgets(char *str, int size, FILE *stream); >> >> Klocwork complain about passing "sizeof()" as size parameter since >> implicit casting size_t to

[dpdk-dev] [PATCH 5/5] Fix usage of fgets in various places

2015-02-24 Thread Stephen Hemminger
On Tue, 24 Feb 2015 11:20:33 +0200 Panu Matilainen wrote: > The tool is technically correct, even if loss of precision might be > unlikely to occur in this context Overflow is not there in the code. That is why I said "shooting Unicorns"; this is all about about fixing bugs that don't exist

[dpdk-dev] [PATCH 5/5] Fix usage of fgets in various places

2015-02-23 Thread Pawel Wodkowski
Declaration of fgets() is char *fgets(char *str, int size, FILE *stream); Klocwork complain about passing "sizeof()" as size parameter since implicit casting size_t to int might cause loss of precision. Signed-off-by: Pawel Wodkowski --- lib/librte_cfgfile/rte_cfgfile.c| 2 +-

[dpdk-dev] [PATCH 5/5] Fix usage of fgets in various places

2015-02-23 Thread Stephen Hemminger
On Mon, 23 Feb 2015 15:10:00 +0100 Pawel Wodkowski wrote: > Declaration of fgets() is > char *fgets(char *str, int size, FILE *stream); > > Klocwork complain about passing "sizeof()" as size parameter since > implicit casting size_t to int might cause loss of precision. > > Signed-off-by: