bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15634: coreutils-8.21 possible coding error ?


From: David Binderman
Subject: bug#15634: coreutils-8.21 possible coding error ?
Date: Thu, 17 Oct 2013 07:33:33 +0000

Hello there,

I just ran the static analysis tool cppcheck over the source code
of coreutils-8.21

It said many things, including

[src/dircolors.c:445]: (warning) Comparison of a boolean value using relational 
operator (<,>, <= or>=).

Source code is

  if (!print_database < argc)

Some round brackets might help clarify the code

  if ((!print_database) < argc)

or was perhaps

  if (!(print_database < argc))

intended ? Here are some other things cppcheck found.

[lib/mountlist.c:945]: (error) Resource leak: dirp
[lib/sig2str.c:329]: (warning) Logical conjunction always evaluates to false: 
signum <= -1 && signum>= 0.
[lib/closein.c:91]: (error) fflush() called on input stream 'stdin' results in 
undefined behaviour.

Regards

David Binderman                                           




reply via email to

[Prev in Thread] Current Thread [Next in Thread]