diff options
| author | Ed Tanous <ed.tanous@intel.com> | 2019-07-09 16:24:22 -0700 |
|---|---|---|
| committer | Ed Tanous <ed.tanous@intel.com> | 2019-10-10 23:25:26 +0000 |
| commit | 271584ab78b4c1926f766aa26ddfde7da329059f (patch) | |
| tree | 08001912ea542de88b9c31f5d53f195dedd56988 /scripts | |
| parent | 70ee8cbd4f3ec5b3e3c18967de221a9f3a70cd38 (diff) | |
| download | bmcweb-271584ab78b4c1926f766aa26ddfde7da329059f.tar.gz bmcweb-271584ab78b4c1926f766aa26ddfde7da329059f.zip | |
Fix a bunch of warnings
using the list of warnings from here:
https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Seems like a good place to start, and would improve things a bit
type-wise. This patchset attempts to correct all the issues in one
shot.
Tested:
It builds. Will test various subsystems that have been touched
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/parse_registries.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/scripts/parse_registries.py b/scripts/parse_registries.py index 3eff312..572fe7e 100644 --- a/scripts/parse_registries.py +++ b/scripts/parse_registries.py @@ -41,7 +41,7 @@ namespace redfish::message_registries::{} SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) -include_path = os.path.realpath(os.path.join(SCRIPT_DIR, "..", "redfish-core", "include")) +include_path = os.path.realpath(os.path.join(SCRIPT_DIR, "..", "redfish-core", "include", "registries")) proxies = { 'https': os.environ.get("https_proxy", None) @@ -65,15 +65,15 @@ for file, json, namespace in files: registry.write(REGISTRY_HEADER.format(namespace)) # Parse the Registry header info registry.write("const Header header = {") - registry.write(".copyright = \"{}\",".format(json["@Redfish.Copyright"])) - registry.write(".type = \"{}\",".format(json["@odata.type"])) - registry.write(".id = \"{}\",".format(json["Id"])) - registry.write(".name = \"{}\",".format(json["Name"])) - registry.write(".language = \"{}\",".format(json["Language"])) - registry.write(".description = \"{}\",".format(json["Description"])) - registry.write(".registryPrefix = \"{}\",".format(json["RegistryPrefix"])) - registry.write(".registryVersion = \"{}\",".format(json["RegistryVersion"])) - registry.write(".owningEntity = \"{}\",".format(json["OwningEntity"])) + registry.write("\"{}\",".format(json["@Redfish.Copyright"])) + registry.write("\"{}\",".format(json["@odata.type"])) + registry.write("\"{}\",".format(json["Id"])) + registry.write(".\"{}\",".format(json["Name"])) + registry.write("\"{}\",".format(json["Language"])) + registry.write("\"{}\",".format(json["Description"])) + registry.write(".\"{}\",".format(json["RegistryPrefix"])) + registry.write("\"{}\",".format(json["RegistryVersion"])) + registry.write("\"{}\",".format(json["OwningEntity"])) registry.write("};") # Parse each Message entry @@ -82,17 +82,17 @@ for file, json, namespace in files: registry.write("MessageEntry{") registry.write("\"{}\",".format(messageId)) registry.write("{") - registry.write(".description = \"{}\",".format(message["Description"])) - registry.write(".message = \"{}\",".format(message["Message"])) - registry.write(".severity = \"{}\",".format(message["Severity"])) - registry.write(".numberOfArgs = {},".format(message["NumberOfArgs"])) - registry.write(".paramTypes = {") + registry.write("\"{}\",".format(message["Description"])) + registry.write("\"{}\",".format(message["Message"])) + registry.write("\"{}\",".format(message["Severity"])) + registry.write("{},".format(message["NumberOfArgs"])) + registry.write("{") paramTypes = message.get("ParamTypes") if paramTypes: for paramType in paramTypes: registry.write("\"{}\",".format(paramType)) registry.write("},") - registry.write(".resolution = \"{}\",".format(message["Resolution"])) + registry.write("\"{}\",".format(message["Resolution"])) registry.write("}},") registry.write("};}\n") - subprocess.check_call(["clang-format", "-i", file]) + subprocess.check_call(["clang-format-6.0", "-i", file]) |

