diff --git a/NEWS b/NEWS index aee6e4b92..31627e686 100644 --- a/NEWS +++ b/NEWS @@ -18,7 +18,7 @@ Version 4.7.0 such as the TM-D710/TM-V71 that use EOM_TH (\r) as the command terminator. (TNX, Lars Kellogg-Stedman and George Baltz). * Reduce/repair excess output from cppcheck.sh - mostly cosmetic changes (WIP) - Output from `wc -l cppcheck.log` - 4.6.2: 981 now: 732 + Output from `wc -l cppcheck.log` - 4.6.2: 981 now: 673 * Remove dead getopt code. GitHub PR #1709. (TNX Daniele Forsi) * Move rig_cache to separate(calloc) storage. Prepare for other moves. Issue #1420 diff --git a/src/serial.c b/src/serial.c index 6fdecc739..1421f51fd 100644 --- a/src/serial.c +++ b/src/serial.c @@ -892,7 +892,7 @@ int HAMLIB_API serial_flush(hamlib_port_t *p) { // we pass an empty stopset so read_string can determine // the appropriate stopset for async data - const char stopset[1]; + const char stopset[1] = ""; len = read_string(p, buf, sizeof(buf) - 1, stopset, 0, 1, 1); if (len > 0) diff --git a/tests/hamlibmodels.c b/tests/hamlibmodels.c index a7cfac7f0..398629633 100644 --- a/tests/hamlibmodels.c +++ b/tests/hamlibmodels.c @@ -16,7 +16,7 @@ static int hash_model_list(const struct rig_caps *caps, void *data) return 1; /* !=0, we want them all ! */ } -int mycmp(const void *p1, const void *p2) +static int mycmp(const void *p1, const void *p2) { const char **s1 = (const char **)p1; const char **s2 = (const char **)p2; diff --git a/tests/rigfreqwalk.c b/tests/rigfreqwalk.c index 5ae1a1394..c268c3f4f 100644 --- a/tests/rigfreqwalk.c +++ b/tests/rigfreqwalk.c @@ -17,7 +17,7 @@ double history[HISTORYSIZE]; int nhistory; int historyinit = 1; -double compute_mean(const double arr[], int length) +static double compute_mean(const double arr[], int length) { double sum = 0.0; @@ -29,7 +29,7 @@ double compute_mean(const double arr[], int length) return sum / length; } -double sigma(double arr[], int length) +static double sigma(double arr[], int length) { double mean = compute_mean(arr, length); double sum_of_squares = 0.0; diff --git a/tests/rigmatrix.c b/tests/rigmatrix.c index 72e8e182f..35652e7e5 100644 --- a/tests/rigmatrix.c +++ b/tests/rigmatrix.c @@ -112,7 +112,7 @@ int print_caps_sum(struct rig_caps *caps, void *data) /* * IO params et al. */ -int print_caps_parameters(struct rig_caps *caps, void *data) +static int print_caps_parameters(struct rig_caps *caps, void *data) { printf("%s", caps->rig_model, @@ -223,7 +223,7 @@ int print_caps_parameters(struct rig_caps *caps, void *data) * * TODO: add new API calls! */ -int print_caps_caps(struct rig_caps *caps, void *data) +static int print_caps_caps(struct rig_caps *caps, void *data) { printf("%s", caps->rig_model, @@ -271,7 +271,7 @@ int print_caps_caps(struct rig_caps *caps, void *data) /* * Get/Set parm abilities */ -int print_caps_parm(struct rig_caps *caps, void *data) +static int print_caps_parm(struct rig_caps *caps, void *data) { setting_t parm; int i; @@ -307,7 +307,7 @@ int print_caps_parm(struct rig_caps *caps, void *data) /* * VFO Ops capabilities */ -int print_caps_vfo_ops(struct rig_caps *caps, void *data) +static int print_caps_vfo_ops(struct rig_caps *caps, void *data) { setting_t vfo_ops; int i; @@ -345,7 +345,7 @@ int print_caps_vfo_ops(struct rig_caps *caps, void *data) /* * Get/Set level abilities */ -int print_caps_level(struct rig_caps *caps, void *data) +static int print_caps_level(struct rig_caps *caps, void *data) { setting_t level; int i; @@ -382,7 +382,7 @@ int print_caps_level(struct rig_caps *caps, void *data) /* * Get/Set func abilities */ -int print_caps_func(struct rig_caps *caps, void *data) +static int print_caps_func(struct rig_caps *caps, void *data) { setting_t func; int i; @@ -421,7 +421,7 @@ int print_caps_func(struct rig_caps *caps, void *data) * * FIXME: default output pics is for region2: add region 1 too! */ -int print_caps_range(struct rig_caps *caps, void *data) +static int print_caps_range(struct rig_caps *caps, void *data) { create_png_range(caps->rx_range_list2, caps->tx_range_list2, caps->rig_model); @@ -567,7 +567,7 @@ static void draw_range(const freq_range_t range_list[], } -int create_png_range(const freq_range_t rx_range_list[], +static int create_png_range(const freq_range_t rx_range_list[], const freq_range_t tx_range_list[], int num) { diff --git a/tests/rotctl.c b/tests/rotctl.c index 4ec0d929d..3896d94a8 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -444,7 +444,6 @@ int main(int argc, char *argv[]) } } - // cppcheck-suppress knownConditionTrueFalse while (retcode == 0 || retcode == 2); #ifdef HAVE_LIBREADLINE