[PATCH -next] efs: fix -Wunused-const-variable= warning

From: Zhu Wang
Date: Wed Aug 02 2023 - 02:58:31 EST


When building with W=1, the following warning occurs.

In file included from fs/efs/super.c:18:0:
fs/efs/efs.h:22:19: warning: ‘cprt’ defined but not used [-Wunused-const-variable=]
static const char cprt[] = "EFS: "EFS_VERSION" - (c) 1999 Al Smith
<Al.Smith@xxxxxxxxxxxxxxxx>";
^~~~
The header file is included in many C files, there are many
similar errors which are not included here. We add __maybe_unsed
to remove it.

Fixes: 45254b4fb2ae ("efs: move headers out of include/linux/")
Signed-off-by: Zhu Wang <wangzhu9@xxxxxxxxxx>
---
fs/efs/efs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/efs/efs.h b/fs/efs/efs.h
index 13a4d9622633..8202be1b2ade 100644
--- a/fs/efs/efs.h
+++ b/fs/efs/efs.h
@@ -19,7 +19,8 @@

#define EFS_VERSION "1.0a"

-static const char cprt[] = "EFS: "EFS_VERSION" - (c) 1999 Al Smith <Al.Smith@xxxxxxxxxxxxxxxx>";
+static const char __maybe_unused cprt[] =
+ "EFS: "EFS_VERSION" - (c) 1999 Al Smith <Al.Smith@xxxxxxxxxxxxxxxx>";


/* 1 block is 512 bytes */
--
2.17.1