summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryangwei <[email protected]>2024-11-14 09:56:10 +0800
committeryangwei <[email protected]>2024-11-14 09:56:10 +0800
commit80c3e589a69b93f694e372f77082bc90f5bd8f9c (patch)
tree99dacef5e2d6eb5f0b6cf46e5eb02105c5bdbdcc
parent6bad95bc2bca6dac61566c51886a21f3a0117137 (diff)
🐞 fix(fix el9 compile warnig): cppcheck & include files
-rw-r--r--.gitlab-ci.yml1
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/stellar_on_sapp/stellar_on_sapp_api.c7
-rw-r--r--src/stellar_on_sapp/stellar_on_sapp_loader.c2
4 files changed, 9 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7cdd2fd..31b3ed8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -50,6 +50,7 @@ stages:
--suppress=uninitvar
--suppress=unusedStructMember
--suppress=funcArgOrderDifferent
+ --suppress=*:${CI_PROJECT_DIR}/deps/*
tags:
- share
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6384eeb..d06b472 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,7 @@ if (CMAKE_CXX_CPPCHECK)
"--suppress=redundantAssignment"
"--suppress=duplicateValueTernary"
"--suppress=funcArgOrderDifferent"
+ "--suppress=knownConditionTrueFalse"
)
set(CMAKE_C_CPPCHECK ${CMAKE_CXX_CPPCHECK})
else()
diff --git a/src/stellar_on_sapp/stellar_on_sapp_api.c b/src/stellar_on_sapp/stellar_on_sapp_api.c
index 2a2d05c..56f1002 100644
--- a/src/stellar_on_sapp/stellar_on_sapp_api.c
+++ b/src/stellar_on_sapp/stellar_on_sapp_api.c
@@ -10,11 +10,14 @@
#include "plugin_manager/plugin_manager.h"
-
#include <MESA/stream.h>
-
+#include <string.h>
#include <assert.h>
+
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+
struct stellar
{
struct plugin_manager_schema *plug_mgr;
diff --git a/src/stellar_on_sapp/stellar_on_sapp_loader.c b/src/stellar_on_sapp/stellar_on_sapp_loader.c
index 16ff7f6..f720834 100644
--- a/src/stellar_on_sapp/stellar_on_sapp_loader.c
+++ b/src/stellar_on_sapp/stellar_on_sapp_loader.c
@@ -6,6 +6,8 @@
#include "stellar_on_sapp.h"
#include <MESA/stream.h>
+#include <stddef.h>
+
#define STELLAR_PLUGIN_PATH "./stellar_plugin/spec.toml"
#define STELLAR_BRIDEGE_NAME "STELLAR_SESSION"
#define STELLAR_EXDATA_NAME "SAPP_STREAMINFO"