diff --git a/.gitignore b/.gitignore index 0cae6e1a5..5e0088e90 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ *.lo *.la *.orig +*.sh.log +*.sh.trs *.swp $depbase.Tpo Makefile diff --git a/cppcheck.sh b/cppcheck.sh index f023965f5..13c282ad1 100755 --- a/cppcheck.sh +++ b/cppcheck.sh @@ -21,13 +21,7 @@ SUPPRESS="\ --suppress=*:extra/gnuradio/ssb.h \ --suppress=*:extra/gnuradio/wfm.h \ --suppress=*:extra/gnuradio/wfm.h \ ---suppress=*:extra/gnuradio/HrAGC.h \ ---suppress=knownConditionTrueFalse:tests/rotctl.c \ ---suppress=knownConditionTrueFalse:tests/rigctl.c \ ---suppress=knownConditionTrueFalse:tests/ampctl.c \ ---suppress=knownConditionTrueFalse:tests/rotctl_parse.c \ ---suppress=knownConditionTrueFalse:tests/rigctl_parse.c \ ---suppress=knownConditionTrueFalse:tests/ampctl_parse.c" +--suppress=*:extra/gnuradio/HrAGC.h #CHECK="\ #-D RIG_LEVEL_LINEOUT=1 \ @@ -82,8 +76,9 @@ if test $# -eq 0 ; then cppcheck --inline-suppr \ -I src \ -I include \ - --include=include/hamlib/config.h \ - --include=include/hamlib/rig.h \ + -I include/hamlib/ \ + -I lib \ + -I security \ -q \ --force \ --enable=all \ @@ -93,17 +88,17 @@ if test $# -eq 0 ; then . \ >cppcheck.log 2>&1 else - cppcheck --check-config \ - --inline-suppr \ + cppcheck --inline-suppr \ -I src \ -I include \ - --include=include/config.h \ - --include=include/hamlib/rig.h \ + -I include/hamlib/ \ + -I lib \ + -I security \ -q \ --force \ --enable=all \ --std=c99 \ $SUPPRESS \ $CHECK \ - $1 + "$@" fi diff --git a/src/amp_conf.c b/src/amp_conf.c index cfd71e6e8..9651f5238 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -472,8 +472,6 @@ int frontamp_get_conf2(AMP *amp, token_t token, char *val, int val_len) */ -#ifdef XXREMOVEDXXC -// Not referenced anywhere /** * \brief Executes cfunc on all the elements stored in the configuration * parameters table. @@ -534,7 +532,6 @@ int HAMLIB_API amp_token_foreach(AMP *amp, return RIG_OK; } -#endif /** diff --git a/src/neverused.c b/src/neverused.c index 891e52bc9..004c589c0 100644 --- a/src/neverused.c +++ b/src/neverused.c @@ -23,7 +23,6 @@ void never_used() amp_ext_token_lookup(); amp_probe_all(); amp_set_powerstat(); - amp_token_foreach(); amp_unregister(); cm108_dcd_get(); CtrlHandler(); diff --git a/tests/ampctl.c b/tests/ampctl.c index a4cac10c0..ee0a79d42 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -320,8 +320,6 @@ int main(int argc, char *argv[]) my_amp->state.ampport_deprecated.parm.serial.rate = serial_rate; } -#if 0 - /* * print out conf parameters */ @@ -330,8 +328,6 @@ int main(int argc, char *argv[]) amp_token_foreach(my_amp, print_conf_list, (rig_ptr_t)my_amp); } -#endif - /* * Print out capabilities, and exits immediately as we may be interested * only in caps, and rig_open may fail. diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index 757d3b5f4..73ae8023d 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -1493,7 +1493,6 @@ void usage_amp(FILE *fout) } -#if 0 int print_conf_list(const struct confparams *cfp, rig_ptr_t data) { AMP *amp = (AMP *) data; @@ -1538,7 +1537,7 @@ int print_conf_list(const struct confparams *cfp, rig_ptr_t data) return 1; /* != 0, we want them all ! */ } -#endif + static int hash_model_list(const struct amp_caps *caps, void *data) { diff --git a/tests/ampctld.c b/tests/ampctld.c index 3874c968a..dcfe65a45 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -345,8 +345,6 @@ int main(int argc, char *argv[]) my_amp->state.ampport.parm.serial.rate = serial_rate; } -#if 0 - /* * print out conf parameters */ @@ -355,8 +353,6 @@ int main(int argc, char *argv[]) amp_token_foreach(my_amp, print_conf_list, (rig_ptr_t)my_amp); } -#endif - /* * Print out conf parameters, and exits immediately as we may be * interested only in only caps, and rig_open may fail. diff --git a/tests/rigctld.c b/tests/rigctld.c index 0a94e2d7b..b9c6dbc64 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1230,9 +1230,9 @@ void *handle_socket(void *arg) mutex_rigctld(0); #else - mutext_rigctld(1); + mutex_rigctld(1); retcode = rig_open(my_rig); - mutext_rigctld(1); + mutex_rigctld(1); if (RIG_OK == retcode && verbose > RIG_DEBUG_ERR) { diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index 5d3b42977..3ee212bc4 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -1214,9 +1214,9 @@ void *handle_socket(void *arg) mutex_rigctld(0); #else - mutext_rigctld(1); + mutex_rigctld(1); retcode = rig_open(my_rig); - mutext_rigctld(1); + mutex_rigctld(1); if (RIG_OK == retcode && verbose > RIG_DEBUG_ERR) { diff --git a/tests/rigtestlibusb.c b/tests/rigtestlibusb.c index c0d3d92e5..28cb8047e 100644 --- a/tests/rigtestlibusb.c +++ b/tests/rigtestlibusb.c @@ -27,7 +27,7 @@ #include #include "config.h" #if defined(HAVE_LIBUSB_H) -#include "libusb.h" +#include #elif defined(HAVE_LIBUSB_1_0_LIBUSB_H) #include #endif