[coreboot-gerrit] Patch set updated for coreboot: 6c515a9 vendorcode/amd/agesa/f16kb/*/PcieComplexDataKB.c: Implicit truncation
Edward O'Callaghan (eocallaghan@alterapraxis.com)
gerrit at coreboot.org
Tue Dec 9 19:03:35 CET 2014
Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7719
-gerrit
commit 6c515a9acd5c8920f5e5d9f98055bfbb1f09645d
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date: Tue Dec 9 03:39:13 2014 +1100
vendorcode/amd/agesa/f16kb/*/PcieComplexDataKB.c: Implicit truncation
Clang complains:
"implicit truncation from 'int' to bitfield changes value from -1 to 15"
-1 is define in 'c11std 6.3.1.3p2' as:
[Signed and unsigned integers] Otherwise, if the new type is unsigned,
the value is converted by repeatedly adding or subtracting one
more than the maximum value that can be represented in the new type
until the value is in the range of the new type.60)
FOOTNOTE.60 The rules describe arithmetic on the mathem...
This is "0xFF" on Mullins and "0xF" in this case. Clang seems to
complain about this two's complement in a bitfield. Turn off said
warning in this file under clang builds.
Change-Id: Ib7476d453ffd932bb911e638117cf9f56f71f269
Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
.../agesa/f16kb/Proc/GNB/Modules/GnbInitKB/PcieComplexDataKB.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/PcieComplexDataKB.c b/src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/PcieComplexDataKB.c
index 5fd3cca..b01b824 100644
--- a/src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/PcieComplexDataKB.c
+++ b/src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/PcieComplexDataKB.c
@@ -43,6 +43,12 @@
*
*/
+#ifdef __clang__
+/* Silence clang warnings via pragmas to avoid the problems in this file
+ * blocking analyzes for the rest of the tree. */
+#pragma clang diagnostic ignored "-Wbitfield-constant-conversion"
+#endif
+
/*----------------------------------------------------------------------------------------
* M O D U L E S U S E D
*----------------------------------------------------------------------------------------
@@ -145,8 +151,8 @@ KB_COMPLEX_CONFIG ComplexDataKB = {
0,
DDI_START_PHY_LANE,
DDI_END_PHY_LANE,
- -1,
- 0,
+ -1, // Start PCIe Core ID (4 bits)
+ 0, // End PCIe Core ID (4 bits)
0,
{
1,
More information about the coreboot-gerrit
mailing list