linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Hans Christian Lønstad" <hcl@datarespons.no>
To: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Subject: [PATCH] Fix const definition without initialization
Date: Wed, 13 May 2020 07:11:59 +0000	[thread overview]
Message-ID: <AM6PR03MB416574D2D264C136BA63C4C5C4BF0@AM6PR03MB4165.eurprd03.prod.outlook.com> (raw)

From: Hans Christian Lonstad <hcl@datarespons.no>
Date: Tue, 12 May 2020 15:58:40 +0200
Subject: [PATCH] Fix const definition without initialization

Compile error using g++ 9.3. Remove const specifier given the structure is filled in run-time.
---
 include/libmtd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/libmtd.h b/include/libmtd.h
index cc24af8..dc339d1 100644
--- a/include/libmtd.h
+++ b/include/libmtd.h
@@ -77,8 +77,8 @@ struct mtd_dev_info
  int major;
  int minor;
  int type;
- const char type_str[MTD_TYPE_MAX + 1];
- const char name[MTD_NAME_MAX + 1];
+ char type_str[MTD_TYPE_MAX + 1];
+ char name[MTD_NAME_MAX + 1];
  long long size;
  int eb_cnt;
  int eb_size;
--
2.25.1

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

             reply	other threads:[~2020-05-13  7:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  7:11 Hans Christian Lønstad [this message]
2020-10-18 21:00 ` Subject: [PATCH] Fix const definition without initialization David Oberhollenzer

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=AM6PR03MB416574D2D264C136BA63C4C5C4BF0@AM6PR03MB4165.eurprd03.prod.outlook.com \
    --to=hcl@datarespons.no \
    --cc=linux-mtd@lists.infradead.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).