From: Christophe CURIS <[email protected]>
Hello,
This series of patch is trying to improve a little bit the situation on
unused arguments in functions.
- patches 1 to 5 remove args that are not used;
- patches 6 and 7 improve a little bit the code (seen during my work);
- patch 8 marks an unused arg as used to avoid false report
About patch 8, there are 2 possible ways to avoid false reports:
- using technique proposed in the patch, which has the advantage to be
compatible with all C compilers;
- using an attribute on the arg itself, which has the advantage that
the compiler will also warn if we actually use the arg, but the drawback
to be less portable (although there are workarounds possible to reduce
the impact).
Carlos,
If you accept patch 8 as-is I will suppose you prefer method 1;
If you don't and tell it, I will propose a new version of patch 8 using
the other solution (with the little extra for compatibility).
Regards,
Christophe.
Removed parameter to function 'create_tab_icon_workspace' that was not
used
Removed parameters to function 'open_window_menu_core' that were not
used
Removed parameter to function 'updateResistance' that was not used
Removed parameter to function 'handleDeadProcess' that was not used
Removed parameters to function 'handle_inotify_events' that were not
used
wmaker: Added reset of file handle variable to avoid multiple file
close
wmaker: Removed non necessary macro for buffer size
wmaker: Marked arg as unused for compiler in callback code
src/event.c | 29 +++++++++++++++++------------
src/moveres.c | 4 ++--
src/startup.c | 2 ++
src/winmenu.c | 8 ++++----
src/winspector.c | 6 +++---
5 files changed, 28 insertions(+), 21 deletions(-)
--
1.8.4.rc3
--
To unsubscribe, send mail to [email protected].