summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/flashrom/flashrom/0002-Disable-Wtautological-pointer-compare-when-using-cla.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/flashrom/flashrom/0002-Disable-Wtautological-pointer-compare-when-using-cla.patch')
-rw-r--r--meta-oe/recipes-extended/flashrom/flashrom/0002-Disable-Wtautological-pointer-compare-when-using-cla.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/flashrom/flashrom/0002-Disable-Wtautological-pointer-compare-when-using-cla.patch b/meta-oe/recipes-extended/flashrom/flashrom/0002-Disable-Wtautological-pointer-compare-when-using-cla.patch
new file mode 100644
index 000000000..aec11bffa
--- /dev/null
+++ b/meta-oe/recipes-extended/flashrom/flashrom/0002-Disable-Wtautological-pointer-compare-when-using-cla.patch
@@ -0,0 +1,35 @@
1From 9be0d152dfe8ac0f9b665d61aeb3f99dae533e0f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 Oct 2016 00:25:09 +0000
4Subject: [PATCH 2/3] Disable Wtautological-pointer-compare when using clang
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 flashrom.c | 4 ++++
9 1 file changed, 4 insertions(+)
10
11diff --git a/flashrom.c b/flashrom.c
12index 04e9934..bf49104 100644
13--- a/flashrom.c
14+++ b/flashrom.c
15@@ -1569,6 +1569,9 @@ int selfcheck(void)
16 * For 'flashchips' we check the first element to be non-null. In the
17 * other cases there exist use cases where the first element can be
18 * null. */
19+#pragma clang diagnostic push
20+#pragma clang diagnostic ignored "-Wtautological-pointer-compare"
21+
22 if (flashchips == NULL || flashchips[0].vendor == NULL) {
23 msg_gerr("Flashchips table miscompilation!\n");
24 ret = 1;
25@@ -1602,6 +1605,7 @@ int selfcheck(void)
26 msg_gerr("Known laptops table does not exist!\n");
27 ret = 1;
28 }
29+#pragma clang diagnostic pop
30 #endif
31 return ret;
32 }
33--
341.9.1
35