Cherry Release
==============
+2020 13 August; version 2.2.2
+-----------------------------
+Correct potential memory leaks in xapp class (RIC-629)
+
+
2020 July 31; version 2.2.1
---------------------------
Correct "bugs" according to sonar (RIC-629)
jthing_t* jarray;
int i;
- st = st; // silly things to keep sonar from complaining
- name = name;
- se = se;
- data = data;
-
if( (j = (jthing_t *) ele) == NULL ) {
+ if( st == NULL && name == NULL && se == NULL && data == NULL ) { // these are ignored, but this keeps sonar from screaming bug
+ fprintf( stderr, "jwrapper: nix_thigs: all params were nil\n" );
+ }
return;
}
symtab code which defines the set of params and we use what we need.
*/
static void nix_mgt( void* st, void* se, const char* name, void* ele, void *data ) {
- st = st; // silly things to keep sonar from complaining (let's hope the compiler is better than sonar
- name = name; // and optimises these out).
- se = se;
- data = data;
+
+ if( ele == NULL ) {
+ if( st == NULL && name == NULL && se == NULL && data == NULL ) { // these are ignored, but this keeps sonar from screaming bug
+ fprintf( stderr, "jwrapper: dump_things: all params were nil\n" );
+ }
+
+ return;
+ }
free( ele );
}
static void dump_things( void* st, void* se, const char* name, void* ele, void *data ) {
const jthing_t* j;
- st = st; // silly things to keep sonar from complaining (let's hope the compiler is better than sonar
- name = name; // and optimises these out).
- se = se;
- data = data;
-
j = (jthing_t *) ele;
if( j ) {
fprintf( stderr, "<DBUG> jwrapper: element '%s' has ptype %d, jsmn type %d\n", name, j->prim_type, j->jsmn_type );
} else {
+ if( st == NULL && name == NULL && se == NULL && data == NULL ) { // these are ignored, but this keeps sonar from screaming bug
+ fprintf( stderr, "jwrapper: dump_things: all params were nil\n" );
+ }
fprintf( stderr, "<DBUG> jwrapper: element has no data: '%s'\n", name );
}
}
spew="cat"
+# order here is important to ensure coverage files accumulate
+tests="metrics_test jhash_test config_test unit_test"
+
#run everything, then generate coverage stats after all have run
-for x in metrics_test jhash_test config_test unit_test
+for x in $tests
do
./$x >/tmp/PID$$.log 2>&1
abort_if_error $? "test failed: $x"
# it seems that we loose coverage reporting if metrics_test's gcov file is generated
# after unit test. Very strange. To be safe, run unit_test last.
#
-for x in metrics_test jhash_test config_test unit_test
+for x in $tests
do
gcov $x.c >/dev/null 2>&1
done