mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhu Wang <wangzhu9@huawei.com>
To: <akpm@linux-foundation.org>, <linux-kernel@vger.kernel.org>
Cc: <wangzhu9@huawei.com>
Subject: [PATCH -next] efs: fix -Wunused-const-variable= warning
Date: Wed, 2 Aug 2023 14:57:53 +0800	[thread overview]
Message-ID: <20230802065753.217179-1-wangzhu9@huawei.com> (raw)

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@aeschi.ch.eu.org>";
                   ^~~~
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@huawei.com>
---
 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@aeschi.ch.eu.org>";
+static const char __maybe_unused cprt[] =
+	"EFS: "EFS_VERSION" - (c) 1999 Al Smith <Al.Smith@aeschi.ch.eu.org>";
 
 
 /* 1 block is 512 bytes */
-- 
2.17.1


             reply	other threads:[~2023-08-02  6:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02  6:57 Zhu Wang [this message]
2023-08-02 17:02 ` Andrew Morton

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=20230802065753.217179-1-wangzhu9@huawei.com \
    --to=wangzhu9@huawei.com \
    --cc=akpm@linux-foundation.org \
    --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

all inboxes | Powered by JetHome®