linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Remove extra 'const' modifiers; they don't do anything.
@ 2014-06-13 21:34 Adam Buchbinder
  2014-06-13 21:34 ` [PATCH 2/2] Remove a leading '+' Adam Buchbinder
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Buchbinder @ 2014-06-13 21:34 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dave, Adam Buchbinder

'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-

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] Remove a leading '+'.
  2014-06-13 21:34 [PATCH 1/2] Remove extra 'const' modifiers; they don't do anything Adam Buchbinder
@ 2014-06-13 21:34 ` Adam Buchbinder
  2014-06-13 21:46   ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Buchbinder @ 2014-06-13 21:34 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dave, Adam Buchbinder

It was added in commit aab7f3ae3eb02fb7e8a6a31d7e2ada704a3dcd5e,
most likely as a copy-pasteo.

Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
---
 btrfs-show-super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/btrfs-show-super.c b/btrfs-show-super.c
index f42cd15..ed0311f 100644
--- a/btrfs-show-super.c
+++ b/btrfs-show-super.c
@@ -50,7 +50,7 @@ static void print_usage(void)
 	fprintf(stderr, "\t-f : print full superblock information\n");
 	fprintf(stderr, "\t-a : print information of all superblocks\n");
 	fprintf(stderr, "\t-i <super_mirror> : specify which mirror to print out\n");
-+	fprintf(stderr, "\t-F : attempt to dump superblocks with bad magic\n");
+	fprintf(stderr, "\t-F : attempt to dump superblocks with bad magic\n");
 	fprintf(stderr, "%s\n", BTRFS_BUILD_VERSION);
 }
 
-- 
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-

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] Remove a leading '+'.
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2014-06-13 21:46 UTC (permalink / raw)
  To: Adam Buchbinder, linux-btrfs; +Cc: dave

On 6/13/14, 4:34 PM, Adam Buchbinder wrote:
> It was added in commit aab7f3ae3eb02fb7e8a6a31d7e2ada704a3dcd5e,
> most likely as a copy-pasteo.
> 
> Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
> ---
>  btrfs-show-super.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/btrfs-show-super.c b/btrfs-show-super.c
> index f42cd15..ed0311f 100644
> --- a/btrfs-show-super.c
> +++ b/btrfs-show-super.c
> @@ -50,7 +50,7 @@ static void print_usage(void)
>  	fprintf(stderr, "\t-f : print full superblock information\n");
>  	fprintf(stderr, "\t-a : print information of all superblocks\n");
>  	fprintf(stderr, "\t-i <super_mirror> : specify which mirror to print out\n");
> -+	fprintf(stderr, "\t-F : attempt to dump superblocks with bad magic\n");
> +	fprintf(stderr, "\t-F : attempt to dump superblocks with bad magic\n");
>  	fprintf(stderr, "%s\n", BTRFS_BUILD_VERSION);
>  }
>  
> 

Whoa, git blame blames me, but that's not the patch I sent.  ;)

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

thanks,
-Eric


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] Remove a leading '+'.
  2014-06-13 21:46   ` Eric Sandeen
@ 2014-06-14 13:00     ` David Sterba
  0 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2014-06-14 13:00 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Adam Buchbinder, linux-btrfs, dave

On Fri, Jun 13, 2014 at 04:46:25PM -0500, Eric Sandeen wrote:
> > -+	fprintf(stderr, "\t-F : attempt to dump superblocks with bad magic\n");
> > +	fprintf(stderr, "\t-F : attempt to dump superblocks with bad magic\n");
> Whoa, git blame blames me, but that's not the patch I sent.  ;)

My mistak while merging two conflicting show-super patches, sorry.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-14 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 21:34 [PATCH 1/2] Remove extra 'const' modifiers; they don't do anything Adam Buchbinder
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

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).