diff mbox

[oe,meta-oe,37/49] flashrom: Remove redundant const qualifier

Message ID 20161123092209.23699-37-raj.khem@gmail.com
State Accepted
Commit eef06e7cbed31dec67692fee36ccffc9e1a8658e
Headers show

Commit Message

Khem Raj Nov. 23, 2016, 9:21 a.m. UTC
This is flagged by latest clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../0001-ichspi.c-Fix-build-with-clang.patch       | 29 ++++++++++++++++++++++
 .../recipes-extended/flashrom/flashrom_0.9.6.1.bb  |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta-oe/recipes-extended/flashrom/flashrom/0001-ichspi.c-Fix-build-with-clang.patch

-- 
2.10.2

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox

Patch

diff --git a/meta-oe/recipes-extended/flashrom/flashrom/0001-ichspi.c-Fix-build-with-clang.patch b/meta-oe/recipes-extended/flashrom/flashrom/0001-ichspi.c-Fix-build-with-clang.patch
new file mode 100644
index 0000000..ff16f0b
--- /dev/null
+++ b/meta-oe/recipes-extended/flashrom/flashrom/0001-ichspi.c-Fix-build-with-clang.patch
@@ -0,0 +1,29 @@ 
+From a2f603c54013cd0b04bb0103dc615644f315d5e8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 15 Nov 2016 17:39:24 +0000
+Subject: [PATCH] ichspi.c: Fix build with clang
+
+ichspi.c:1130:24: error: duplicate 'const' declaration specifier [-Werror,-Wduplicate-decl-specifier]
+        static const uint32_t const dec_berase[4] = {
+                              ^
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ichspi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ichspi.c b/ichspi.c
+index 0223ae3..e47aebd 100644
+--- a/ichspi.c
++++ b/ichspi.c
+@@ -1127,7 +1127,7 @@ static void ich_hwseq_set_addr(uint32_t addr)
+ static uint32_t ich_hwseq_get_erase_block_size(unsigned int addr)
+ {
+ 	uint8_t enc_berase;
+-	static const uint32_t const dec_berase[4] = {
++	static const uint32_t dec_berase[4] = {
+ 		256,
+ 		4 * 1024,
+ 		8 * 1024,
+-- 
+1.9.1
+
diff --git a/meta-oe/recipes-extended/flashrom/flashrom_0.9.6.1.bb b/meta-oe/recipes-extended/flashrom/flashrom_0.9.6.1.bb
index d3ec578..0edc688 100644
--- a/meta-oe/recipes-extended/flashrom/flashrom_0.9.6.1.bb
+++ b/meta-oe/recipes-extended/flashrom/flashrom_0.9.6.1.bb
@@ -9,6 +9,7 @@  SRC_URI = "http://download.flashrom.org/releases/flashrom-${PV}.tar.bz2 \
            file://0001-Fix-compilation-on-aarch64.patch \
            file://0002-Disable-Wtautological-pointer-compare-when-using-cla.patch \
            file://0003-remove-duplicate-const-qualifiers.patch \
+           file://0001-ichspi.c-Fix-build-with-clang.patch \
            "
 
 SRC_URI[md5sum] = "407e836c0a2b17ec76583cb6809f65e5"