Subject: [PATCH] Fix const definition without initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hans Christian Lonstad <hcl@xxxxxxxxxxxxxx>
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/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux