From: Bernd Petrovitsch <bernd@sysprog.at>
To: linux-sparse@vger.kernel.org
Subject: [PATCH] removed an unused parameter for show_symbol_list()
Date: Thu, 26 Aug 2010 12:31:38 +0200 [thread overview]
Message-ID: <1282818698.12802.23.camel@thorin> (raw)
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
reply other threads:[~2010-08-26 10:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1282818698.12802.23.camel@thorin \
--to=bernd@sysprog.at \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).