Hello there,
I tried out the test release with the static analyser cppcheck and found the
following
1.
Memory leak:
[gsl-1.99.90/linalg/tridiag.c:237]: (error) Memory leak: alpha
[gsl-1.99.90/linalg/tridiag.c:237]: (error) Memory leak: c
[gsl-1.99.90/linalg/tridiag.c:237]: (error) Memory leak: delta
[gsl-1.99.90/linalg/tridiag.c:237]: (error) Memory leak: gamma
[gsl-1.99.90/linalg/tridiag.c:237]: (error) Memory leak: z
Source code is
return GSL_SUCCESS;
2.
[gsl-1.99.90/specfunc/bessel_sequence.c:106]: (style) Array index 'i' is used
before limits check.
Source code is
while(v[i] < x_small && i < size) {
Suggest sanity check array index before use.
3.
[gsl-1.99.90/specfunc/expint.c:380]: (style) Same expression in both branches
of ternary operator.
Source code is
result->val = (scale ? 1.0 : 1.0);
Maybe this is a typo ?
4.
[gsl-1.99.90/multifit/test_nonlinear.c:367]: (warning) printf format string
requires 2 parameters but 3 are given.
Source code is
printf("testing %s/%s...", sname, pname, x0_scale);
I also did a test build with the latest development version of gcc with the
following flags
"-g -O3 -march=native -Wall -Wextra -Wlogical-op -Wshift-overflow" and could
find no
significant warnings.
Regards
David Binderman