diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-03-18 22:00:05 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-03-18 22:00:05 +0100 |
commit | 2af7a570fb52a2e8aff02f3a2f39b38dd096d373 (patch) | |
tree | 6d5515cf9ba8722cccea34e721a77c80819c49b9 | |
parent | bbb22595b1d85290544ed737e6a0b31ddcdf122b (diff) | |
download | sciteco-2af7a570fb52a2e8aff02f3a2f39b38dd096d373.tar.gz |
remove all unused-attributes for parameters
* compiler does not warn by default: this actually makes sense
* so we don't need any unused-attributes
* less GCC-extension based
* on older GCCs I think -Wunused-parameters was enabled by -Wall
we should add -Wno-unused-parameters if that's the case
-rw-r--r-- | src/interface-gtk.cpp | 12 | ||||
-rw-r--r-- | src/interface-ncurses.cpp | 5 | ||||
-rw-r--r-- | src/main.cpp | 4 | ||||
-rw-r--r-- | src/parser.cpp | 2 | ||||
-rw-r--r-- | src/search.cpp | 5 |
5 files changed, 11 insertions, 17 deletions
diff --git a/src/interface-gtk.cpp b/src/interface-gtk.cpp index f48dc37..60c90c3 100644 --- a/src/interface-gtk.cpp +++ b/src/interface-gtk.cpp @@ -215,17 +215,15 @@ InterfaceGtk::~InterfaceGtk() */ static void -scintilla_notify(ScintillaObject *sci __attribute__((unused)), - uptr_t idFrom __attribute__((unused)), - SCNotification *notify, - gpointer user_data __attribute__((unused))) +scintilla_notify(ScintillaObject *sci, uptr_t idFrom, + SCNotification *notify, gpointer user_data) { interface.process_notify(notify); } static gboolean cmdline_key_pressed(GtkWidget *widget, GdkEventKey *event, - gpointer user_data __attribute__((unused))) + gpointer user_data) { bool is_shift = event->state & GDK_SHIFT_MASK; bool is_ctl = event->state & GDK_CONTROL_MASK; @@ -302,9 +300,7 @@ cmdline_key_pressed(GtkWidget *widget, GdkEventKey *event, } static gboolean -exit_app(GtkWidget *w __attribute__((unused)), - GdkEventAny *e __attribute__((unused)), - gpointer p __attribute__((unused))) +exit_app(GtkWidget *w, GdkEventAny *e, gpointer p) { gtk_main_quit(); return TRUE; diff --git a/src/interface-ncurses.cpp b/src/interface-ncurses.cpp index bbde5de..eca9268 100644 --- a/src/interface-ncurses.cpp +++ b/src/interface-ncurses.cpp @@ -51,8 +51,7 @@ static void scintilla_notify(Scintilla *sci, int idFrom, COLOR_PAIR(SCI_COLOR_PAIR(f, b)) void -InterfaceNCurses::main(int &argc __attribute__((unused)), - char **&argv __attribute__((unused))) +InterfaceNCurses::main(int &argc, char **&argv) { init_screen(); cbreak(); @@ -247,7 +246,7 @@ InterfaceNCurses::cmdline_update(const gchar *cmdline) } void -InterfaceNCurses::popup_add(PopupEntryType type __attribute__((unused)), +InterfaceNCurses::popup_add(PopupEntryType type, const gchar *name, bool highlight) { gchar *entry; diff --git a/src/main.cpp b/src/main.cpp index 86c6da5..ca3a37d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -129,7 +129,7 @@ get_teco_ini(const gchar *program) #else static inline gchar * -get_teco_ini(const gchar *program __attribute__((unused))) +get_teco_ini(const gchar *program) { const gchar *home; @@ -295,7 +295,7 @@ main(int argc, char **argv) */ static void -sigint_handler(int signal __attribute__((unused))) +sigint_handler(int signal) { sigint_occurred = TRUE; } diff --git a/src/parser.cpp b/src/parser.cpp index c1cb42e..a5e7151 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2013,7 +2013,7 @@ StateInsert::process(const gchar *str, gint new_chars) throw (Error) } State * -StateInsert::done(const gchar *str __attribute__((unused))) throw (Error) +StateInsert::done(const gchar *str) throw (Error) { /* nothing to be done when done */ return &States::start; diff --git a/src/search.cpp b/src/search.cpp index 7562096..ccf0d53 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -405,8 +405,7 @@ StateSearch::do_search(GRegex *re, gint from, gint to, gint &count) } void -StateSearch::process(const gchar *str, - gint new_chars __attribute__((unused))) throw (Error) +StateSearch::process(const gchar *str, gint new_chars) throw (Error) { static const gint flags = G_REGEX_CASELESS | G_REGEX_MULTILINE | G_REGEX_DOTALL | G_REGEX_RAW; @@ -743,7 +742,7 @@ StateReplace::done(const gchar *str) throw (Error) } State * -StateReplace_ignore::done(const gchar *str __attribute__((unused))) throw (Error) +StateReplace_ignore::done(const gchar *str) throw (Error) { return &States::start; } |