diff mbox series

[2/3] xfsprogs: make a couple of structures static

Message ID ea404006-44aa-ac0a-6bea-b23fb748e71d@sandeen.net (mailing list archive)
State New, archived
Headers show
Series xfsprogs: trivial sparse tidyups | expand

Commit Message

Eric Sandeen Dec. 18, 2019, 10:55 p.m. UTC
From: Eric Sandeen <sandeen@redhat.com>

Eliminates 2 sparse warnings.

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

Comments

Darrick J. Wong Dec. 18, 2019, 11:09 p.m. UTC | #1
On Wed, Dec 18, 2019 at 04:55:38PM -0600, Eric Sandeen wrote:
> From: Eric Sandeen <sandeen@redhat.com>
> 
> Eliminates 2 sparse warnings.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> diff --git a/db/btheight.c b/db/btheight.c
> index 8aa17c89..fdb19a6d 100644
> --- a/db/btheight.c
> +++ b/db/btheight.c
> @@ -22,7 +22,7 @@ static int rmap_maxrecs(struct xfs_mount *mp, int blocklen, int leaf)
>  	return libxfs_rmapbt_maxrecs(blocklen, leaf);
>  }
>  
> -struct btmap {
> +static struct btmap {

Maybe these both should be static const?

--D

>  	const char	*tag;
>  	int		(*maxrecs)(struct xfs_mount *mp, int blocklen,
>  				   int leaf);
> diff --git a/io/bulkstat.c b/io/bulkstat.c
> index 201470b2..05a3d6d6 100644
> --- a/io/bulkstat.c
> +++ b/io/bulkstat.c
> @@ -230,7 +230,7 @@ struct single_map {
>  	uint64_t		code;
>  };
>  
> -struct single_map tags[] = {
> +static struct single_map tags[] = {
>  	{"root", XFS_BULK_IREQ_SPECIAL_ROOT},
>  	{NULL, 0},
>  };
>
diff mbox series

Patch

diff --git a/db/btheight.c b/db/btheight.c
index 8aa17c89..fdb19a6d 100644
--- a/db/btheight.c
+++ b/db/btheight.c
@@ -22,7 +22,7 @@  static int rmap_maxrecs(struct xfs_mount *mp, int blocklen, int leaf)
 	return libxfs_rmapbt_maxrecs(blocklen, leaf);
 }
 
-struct btmap {
+static struct btmap {
 	const char	*tag;
 	int		(*maxrecs)(struct xfs_mount *mp, int blocklen,
 				   int leaf);
diff --git a/io/bulkstat.c b/io/bulkstat.c
index 201470b2..05a3d6d6 100644
--- a/io/bulkstat.c
+++ b/io/bulkstat.c
@@ -230,7 +230,7 @@  struct single_map {
 	uint64_t		code;
 };
 
-struct single_map tags[] = {
+static struct single_map tags[] = {
 	{"root", XFS_BULK_IREQ_SPECIAL_ROOT},
 	{NULL, 0},
 };