Warnign fixes

Updated test results
This commit is contained in:
Luca Deri
2019-01-17 00:39:45 +01:00
parent c856e0a563
commit f3b0878a37
10 changed files with 22 additions and 22 deletions
+3
View File
@@ -22,6 +22,9 @@ install:
dpdk:
make -f Makefile.dpdk
check:
cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I../src/include -I/usr/local/include/json-c *.c
clean:
/bin/rm -f *.o ndpiReader ndpiReader.dpdk
/bin/rm -f .*.dpdk.cmd .*.o.cmd *.dpdk.map .*.o.d
+1 -2
View File
@@ -1015,7 +1015,6 @@ void freeIpTree(addr_node *root) {
freeIpTree(root->left);
freeIpTree(root->right);
free(root);
root = NULL;
}
/* *********************************************** */
@@ -2901,7 +2900,7 @@ float getAverage(struct json_object *jObj_stat, char *field){
float average;
float sum = 0;
int r;
int j;
int j = 0;
if((r = strcmp(field, "top.scanner.stats")) == 0) {
for(j=0; j<json_object_array_length(jObj_stat); j++) {
+1 -1
View File
@@ -1044,7 +1044,7 @@ iph_check:
static uint32_t crc32_for_byte(uint32_t r) {
int j;
for(j = 0; j < 8; ++j)
r = (r & 1? 0: (uint32_t)0xEDB88320L) ^ r >> 1;
r = ((r & 1) ? 0 : (uint32_t)0xEDB88320L) ^ r >> 1;
return r ^ (uint32_t)0xFF000000L;
}