Blob Blame History Raw
From 393b4c2384639fc1c22e3493585c005009b58de7 Mon Sep 17 00:00:00 2001
From: Coiby Xu <coiby.xu@gmail.com>
Date: Tue, 15 Jun 2021 10:48:50 +0800
Subject: [PATCH 5/8] fix Error: MISSING_COMMA: detected by covscan

This commit fixes the following errors found by conscan,

    Error: MISSING_COMMA: [#def3]
    python-dmidecode-3.12.2/src/dmidecode.c:1375: missing_comma: In the initialization of "upgrade", a suspicious concatenated string ""Socket BGA1288Socket rPGA988B"" is produced due to a missing comma between lines.
    python-dmidecode-3.12.2/src/dmidecode.c:1375: remediation: Did you intend to separate these two string literals with a comma?
    # 1373|                   "Socket LGA1567",
    # 1374|                   "Socket PGA988A",
    # 1375|->                 "Socket BGA1288"        /* 0x20 */
    # 1376|                   "Socket rPGA988B",
    # 1377|                   "Socket BGA1023",

    Error: MISSING_COMMA: [#def4]
    python-dmidecode-3.12.2/src/dmidecode.c:1843: missing_comma: In the initialization of "type", a suspicious concatenated string ""64-way Set-associative20-way Set-associative"" is produced due to a missing comma between lines.
    python-dmidecode-3.12.2/src/dmidecode.c:1843: remediation: Did you intend to separate these two string literals with a comma?

    Error: MISSING_COMMA: [#def6]
    python-dmidecode-3.12.2/src/dmidecode.c:2868: missing_comma: In the initialization of "type", a suspicious concatenated string ""DDR3FBD2"" is produced.
    python-dmidecode-3.12.2/src/dmidecode.c:2868: remediation: Did you intend to separate these two string literals with a comma?
    # 2866|                   "Reserved",
    # 2867|                   "Reserved",
    # 2868|->                 "DDR3"
    # 2869|                   "FBD2"          /* 0x19 */
    # 2870|           };
    # 1841|                   "32-way Set-associative",
    # 1842|                   "48-way Set-associative",
    # 1843|->                 "64-way Set-associative"        /* 0x0D */
    # 1844|                   "20-way Set-associative"        /* 0x0E */

Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
 src/dmidecode.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/dmidecode.c b/src/dmidecode.c
index 9efab60..d30a5d3 100644
--- a/src/dmidecode.c
+++ b/src/dmidecode.c
@@ -1372,7 +1372,7 @@ void dmi_processor_upgrade(xmlNode *node, u8 code)
                 "Socket LGA1156",
                 "Socket LGA1567",
                 "Socket PGA988A",
-                "Socket BGA1288"        /* 0x20 */
+                "Socket BGA1288",        /* 0x20 */
                 "Socket rPGA988B",
                 "Socket BGA1023",
                 "Socket BGA1224",
@@ -1840,7 +1840,7 @@ void dmi_cache_associativity(xmlNode *node, u8 code)
                 "24-way Set-associative",
                 "32-way Set-associative",
                 "48-way Set-associative",
-                "64-way Set-associative"        /* 0x0D */
+                "64-way Set-associative",        /* 0x0D */
                 "20-way Set-associative"        /* 0x0E */
         };
         xmlNode *data_n = xmlNewChild(node, NULL, (xmlChar *) "Associativity", NULL);
@@ -2865,7 +2865,7 @@ void dmi_memory_device_type(xmlNode *node, u8 code)
                 "Reserved",
                 "Reserved",
                 "Reserved",
-                "DDR3"
+                "DDR3",
                 "FBD2"          /* 0x19 */
         };
         xmlNode *data_n = xmlNewChild(node, NULL, (xmlChar *) "Type", NULL);
-- 
2.31.1