aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2021-12-04 20:22:05 +0100
committerGitHub <noreply@github.com>2021-12-04 20:22:05 +0100
commit947896ad7dce9602dea1e70948363e568718cbb0 (patch)
treeac98e5e7e892172d29df004588d5093e7c02de15
parent7cba34a1e3aef9cb057db2a5f5fab22473aabc48 (diff)
Fix configure script (after fb85dac9) (#1381)
Fix/disable some LGTM warnings
-rw-r--r--.gitignore3
-rw-r--r--configure.ac2
-rw-r--r--example/ndpiReader.c2
-rw-r--r--lgtm.yml2
-rw-r--r--src/lib/ndpi_main.c4
5 files changed, 9 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index da3e85894..0eaa276ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,3 +75,6 @@ stamp-h1
/tests/dga/dga_evaluate
/tests/unit/unit
/tags
+/rrdtool/Makefile
+/rrdtool/rrd_anomaly
+/rrdtool/rrd_similarity
diff --git a/configure.ac b/configure.ac
index 7a6fbab9a..76f47eee1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,7 +110,7 @@ AC_CHECK_LIB([rrd], [rrd_fetch_r], [LIBRRD=-lrrd])
if test "x$ac_cv_lib_rrd_rrd_fetch_r" = xyes; then :
AC_DEFINE_UNQUOTED(HAVE_RRDTOOL, "1", [rrdtool is present])
- EXTRA_TARGETS="rrdtool"
+ EXTRA_TARGETS="$EXTRA_TARGETS rrdtool"
fi
ADDITIONAL_LIBS="$LIBRRD $LIBM"
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index f4f21f99d..641575c12 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1188,7 +1188,7 @@ static char* is_unsafe_cipher(ndpi_cipher_weakness c) {
/* ********************************** */
void print_bin(FILE *fout, const char *label, struct ndpi_bin *b) {
- u_int8_t i;
+ u_int16_t i;
const char *sep = label ? "," : ";";
ndpi_normalize_bin(b);
diff --git a/lgtm.yml b/lgtm.yml
new file mode 100644
index 000000000..2b18425ba
--- /dev/null
+++ b/lgtm.yml
@@ -0,0 +1,2 @@
+queries:
+ - exclude: cpp/cleartext-storage-file
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 974df4a95..807b178e2 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -3010,7 +3010,7 @@ int ndpi_add_host_risk_mask(struct ndpi_detection_module_struct *ndpi_str,
int ndpi_handle_rule(struct ndpi_detection_module_struct *ndpi_str, char *rule, u_int8_t do_add) {
char *at, *proto, *elem;
ndpi_proto_defaults_t *def;
- u_int16_t subprotocol_id, i;
+ u_int subprotocol_id, i;
at = strrchr(rule, '@');
if(at == NULL) {
@@ -3061,7 +3061,7 @@ int ndpi_handle_rule(struct ndpi_detection_module_struct *ndpi_str, char *rule,
}
}
- for(i = 0, def = NULL; i < (int) ndpi_str->ndpi_num_supported_protocols; i++) {
+ for(i = 0, def = NULL; i < ndpi_str->ndpi_num_supported_protocols; i++) {
if(ndpi_str->proto_defaults[i].protoName
&& strcasecmp(ndpi_str->proto_defaults[i].protoName, proto) == 0) {
def = &ndpi_str->proto_defaults[i];