Do not cast unused return values to void
A small style fix that removes all remaining "(void)" casts. Using these
isn't encouraged in GNU coding guidelines and doesn't serve a certain
purpose, except for satisfying a few static code analysis tools. We
already nuked some of these in previous patches, but this semantic patch
should fix what's left:
@@
identifier func;
@@
- (void)func (
+ func (
...);
Long lines were re-formatted manually.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -161,21 +161,21 @@
|
||||
int len; \
|
||||
\
|
||||
len = snprintf (msg, BUFSIZ, "%s: %d: ", __FILE__, __LINE__); \
|
||||
(void)snprintf (msg + len, BUFSIZ - len, __VA_ARGS__); \
|
||||
snprintf (msg + len, BUFSIZ - len, __VA_ARGS__); \
|
||||
if (ui_mode == UI_CURSES) \
|
||||
fatalbox (msg); \
|
||||
else \
|
||||
(void)fprintf (stderr, "%s\n", msg); \
|
||||
fprintf (stderr, "%s\n", msg); \
|
||||
} while (0)
|
||||
|
||||
#define WARN_MSG(...) do { \
|
||||
char msg[BUFSIZ]; \
|
||||
\
|
||||
(void)snprintf (msg, BUFSIZ, __VA_ARGS__); \
|
||||
snprintf (msg, BUFSIZ, __VA_ARGS__); \
|
||||
if (ui_mode == UI_CURSES) \
|
||||
warnbox (msg); \
|
||||
else \
|
||||
(void)fprintf (stderr, "%s\n", msg); \
|
||||
fprintf (stderr, "%s\n", msg); \
|
||||
} while (0)
|
||||
|
||||
#define EXIT(...) do { \
|
||||
|
||||
Reference in New Issue
Block a user