From 715f2c85efd6864136621c148a70d34700dba93f Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta Date: Tue, 24 Feb 2026 09:52:19 +0530 Subject: [PATCH] Fix static code analysis --- .gitlab-ci.yml | 1 + .inferconfig | 3 +++ src/xml.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .inferconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3e033d..cf86b87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ variables: #VERBOSE: true SOURCE_FOLDER: "." COMPILATION_FIXUP: "cmake ." + CPPCHECK_OPTIONS: "--suppress=*:*/usr/include/*" include: - project: 'iopsys/gitlab-ci-pipeline' diff --git a/.inferconfig b/.inferconfig new file mode 100644 index 0000000..06c9b1e --- /dev/null +++ b/.inferconfig @@ -0,0 +1,3 @@ +{ + "suppress_errors": ["DEAD_STORE"] +} diff --git a/src/xml.c b/src/xml.c index 5c0b075..c8b5c80 100644 --- a/src/xml.c +++ b/src/xml.c @@ -1011,7 +1011,7 @@ int load_xml_list_node_data(int node_ref, xmlNode *node, struct xml_data_struct return CWMP_OK; } -bool validate_xml_node_opaque_value(char *node_name, char *opaque, struct xml_tag_validation *validations, int nbre_validations) +bool validate_xml_node_opaque_value(const char *node_name, char *opaque, struct xml_tag_validation *validations, int nbre_validations) { int i; if (node_name == NULL) {