OSDN Git Service

Only switch on printf format warnings for error_exit() and friends when TOYBOX_DEBUG...
authorRob Landley <rob@landley.net>
Sun, 1 Mar 2015 22:35:05 +0000 (16:35 -0600)
committerRob Landley <rob@landley.net>
Sun, 1 Mar 2015 22:35:05 +0000 (16:35 -0600)
commiteb4b1143b1f54a96002a83ea961d40d3169e1ae2
tree27992d2fd018b7577fd82e985dc4904e5a1271c3
parent1be99e695059ba7dbe44765f4b477f7e173e98d1
Only switch on printf format warnings for error_exit() and friends when TOYBOX_DEBUG enabled.

One again gcc manages to be incompetent about producing warnings. For example,
in bzcat we error_exit() with a message that's an error code fed into an
array of string constants, and apparently dereferencing an array of string
literals doesn't give you a string literal according to -Wformat-security.

Not breaking the code to humor the compiler here, the compiler is wrong.
lib/portability.h