linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] removed an unused parameter for show_symbol_list()
@ 2010-08-26 10:31 Bernd Petrovitsch
  0 siblings, 0 replies; only message in thread
From: Bernd Petrovitsch @ 2010-08-26 10:31 UTC (permalink / raw)
  To: linux-sparse

Hi all!

A trivial patch to remove an unused parameter.

Is there some interest in patches to to be able to add -Wextra to gcc's
flags?

The main parts are
- lots of (other) unused parameters which can't be deleted. So they
  should be marked __attribute__((unused)) - either explicitely or
  with a "__unused" (or similar) macro.
- And largest thing is "signed vs unsigned" AFAICS. So is the strategy
  to use/convert to "unsigned" if it makes sense (like bits_in_*
  variables) or use "signed" everywhere?

	Bernd
---

 show-parse.c   |    2 +-
 symbol.h       |    2 +-
 test-parsing.c |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/show-parse.c b/show-parse.c
index eab07c7..de3fea0 100644
--- a/show-parse.c
+++ b/show-parse.c
@@ -127,7 +127,7 @@ static void show_struct_member(const struct symbol
*sym)
 	printf("\n");
 }
 
-void show_symbol_list(const struct symbol_list *list, const char *sep)
+void show_symbol_list(const struct symbol_list *list)
 {
 	struct symbol *sym;
 	const char *prepend = "";
diff --git a/symbol.h b/symbol.h
index 720ad10..9a6af9d 100644
--- a/symbol.h
+++ b/symbol.h
@@ -277,7 +277,7 @@ extern const char *modifier_string(unsigned long
mod);
 extern void show_symbol(const struct symbol *);
 extern int show_symbol_expr_init(const struct symbol *sym);
 extern void show_type_list(struct symbol *);
-extern void show_symbol_list(const struct symbol_list *, const char *);
+extern void show_symbol_list(const struct symbol_list *);
 extern void add_symbol(struct symbol_list **, struct symbol *);
 extern void bind_symbol(struct symbol *, struct ident *, enum
namespace);
 
diff --git a/test-parsing.c b/test-parsing.c
index 0a0b1d4..dc1b083 100644
--- a/test-parsing.c
+++ b/test-parsing.c
@@ -44,7 +44,7 @@ int main(int argc, char **argv)
 	clean_up_symbols(list);
 
 #if 1
-	show_symbol_list(list, "\n\n");
+	show_symbol_list(list);
 	printf("\n\n");
 #endif
 
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
 
 #if 1
 		// Show the end result.
-		show_symbol_list(list, "\n\n");
+		show_symbol_list(list);
 		printf("\n\n");
 #endif
 	} END_FOR_EACH_PTR_NOTAG(file);
-- 
1.7.2.1


-- 
mobile: +43 664 4416156              http://www.sysprog.at/
    Linux Software Development, Consulting and Services


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-26 10:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-26 10:31 [PATCH] removed an unused parameter for show_symbol_list() Bernd Petrovitsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).