mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tony@bakeyournoodle.com (Tony Breeds)
To: Linux Kernel ML <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix warning when building fs/afs/super.c
Date: Fri, 11 May 2007 16:47:45 +1000	[thread overview]
Message-ID: <20070511064745.GD15955@bakeyournoodle.com> (raw)


Fix build waning in fs/afs/super.c

fs/afs/super.c: In function 'afs_parse_options':
fs/afs/super.c:153: warning: passing argument 2 of 'match_token' discards qualifiers from pointer target type

AFS declares it's match_table as const, which is discrded in lib/parser.c.
match_token() doesn't modify the table so making it const should be safe.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
 include/linux/parser.h |    2 +-
 lib/parser.c           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: working/include/linux/parser.h
===================================================================
--- working.orig/include/linux/parser.h
+++ working/include/linux/parser.h
@@ -25,7 +25,7 @@ typedef struct {
 	char *to;
 } substring_t;
 
-int match_token(char *, match_table_t table, substring_t args[]);
+int match_token(char *, const match_table_t table, substring_t args[]);
 int match_int(substring_t *, int *result);
 int match_octal(substring_t *, int *result);
 int match_hex(substring_t *, int *result);
Index: working/lib/parser.c
===================================================================
--- working.orig/lib/parser.c
+++ working/lib/parser.c
@@ -100,7 +100,7 @@ static int match_one(char *s, const char
  * format identifiers which will be taken into account when matching the
  * tokens, and whose locations will be returned in the @args array.
  */
-int match_token(char *s, match_table_t table, substring_t args[])
+int match_token(char *s, const match_table_t table, substring_t args[])
 {
 	const struct match_token *p;
 
Yours Tony

  linux.conf.au        http://linux.conf.au/ || http://lca2008.linux.org.au/
  Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!

                 reply	other threads:[~2007-05-11  6:47 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=20070511064745.GD15955@bakeyournoodle.com \
    --to=tony@bakeyournoodle.com \
    --cc=linux-kernel@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

Powered by JetHome