linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Buchbinder <abuchbinder@google.com>
To: linux-btrfs@vger.kernel.org
Cc: dave@jikos.cz, Adam Buchbinder <abuchbinder@google.com>
Subject: [PATCH 1/2] Remove extra 'const' modifiers; they don't do anything.
Date: Fri, 13 Jun 2014 14:34:35 -0700	[thread overview]
Message-ID: <1402695276-28104-1-git-send-email-abuchbinder@google.com> (raw)

'const int const *x' means the same thing as 'const int *x' or
'int const *x'; the intent was probably 'const int * const x'.
However, this won't work for the 'suffix' variable, as it has
to be assigned, and making the static tables into const pointers
to const chars leads to a mismatch there.

This was found with clang's duplicate-decl-specifier warning.

Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
---
 utils.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/utils.c b/utils.c
index d29de94..91a7111 100644
--- a/utils.c
+++ b/utils.c
@@ -1295,9 +1295,9 @@ out:
 	return ret;
 }
 
-static const char const *unit_suffix_binary[] =
+static const char* unit_suffix_binary[] =
 	{ "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"};
-static const char const *unit_suffix_decimal[] =
+static const char* unit_suffix_decimal[] =
 	{ "B", "KB", "MB", "GB", "TB", "PB", "EB"};
 
 int pretty_size_snprintf(u64 size, char *str, size_t str_size, int unit_mode)
@@ -1305,7 +1305,7 @@ int pretty_size_snprintf(u64 size, char *str, size_t str_size, int unit_mode)
 	int num_divs;
 	float fraction;
 	int base = 0;
-	const char const **suffix = NULL;
+	const char** suffix = NULL;
 	u64 last_size;
 
 	if (str_size == 0)
-- 
2.0.0.526.g5318336

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-

             reply	other threads:[~2014-06-13 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 21:34 Adam Buchbinder [this message]
2014-06-13 21:34 ` [PATCH 2/2] Remove a leading '+' Adam Buchbinder
2014-06-13 21:46   ` Eric Sandeen
2014-06-14 13:00     ` David Sterba

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=1402695276-28104-1-git-send-email-abuchbinder@google.com \
    --to=abuchbinder@google.com \
    --cc=dave@jikos.cz \
    --cc=linux-btrfs@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).