kopia lustrzana https://github.com/Hamlib/Hamlib
cppcheck v1.9 clean bill of health now
cppcheck.sh script added with some exceptions for some code notices neverused.c added to resolve "never used" messagespull/174/head
rodzic
9de3984af9
commit
7c7ecef678
|
@ -0,0 +1,11 @@
|
||||||
|
# Author Michael Black W9MDB
|
||||||
|
# This SUPPRESS setting results in no warnings as of 2020-01-14
|
||||||
|
# There are things that could still be done...especialy in the C++ area
|
||||||
|
echo "See cppcheck.log when done"
|
||||||
|
echo "As of cppcheck v1.90 should be one message about missing include files"
|
||||||
|
echo "This takes several minutes to run"
|
||||||
|
# We do suppress some errors which are expected or other code
|
||||||
|
# There are quite a few C++ items to take care of still if anybody cares
|
||||||
|
SUPPRESS="-i bindings -i lib/getopt.c -i lib/getopt_long.c --suppress=*:gnuradio/demod.h --suppress=*:gnuradio/HrAGC.h --suppress=*:gnuradio/nfm.h --suppress=*:gnuradio/am.h --suppress=*:gnuradio/ssb.h --suppress=*:gnuradio/wfm.h --suppress=*:gnuradio/wfm.h --suppress=*:microtune/i2c.h --suppress=*:microtune/i2cio.h --suppress=*:microtune/i2cio_pp.h --suppress=*:microtune/microtune_4702.h --suppress=*:microtune/microtune_4937.h --suppress=*:microtune/microtune_eval_board.h -i microtune/microtune_eval_board.cc --suppress=*: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"
|
||||||
|
CHECK="-D RIG_LEVEL_LINEOUT=1 -D SIGPIPE -D SIGINT -D IPV6_V6ONLY -D RIG_MODE_WFM -D ABI_VERSION=4 -D F_SETSIG=1 -U O_ASYNC -U SA_SIGINFO -U HASH_BLOOM -U HASH_EMIT_KEYS -U HASH_FUNCTION -U __USEP5P6__"
|
||||||
|
cppcheck -q --force --enable=all --std=c99 $SUPPRESS $CHECK . &>cppcheck.log
|
|
@ -0,0 +1,137 @@
|
||||||
|
// These function are not referenced anywhere inside hamlib
|
||||||
|
// according to cppcheck
|
||||||
|
// Some are marked with XXREMOVEDXX in the code are are
|
||||||
|
// subject to being deprecated in a future release
|
||||||
|
|
||||||
|
void used_externally()
|
||||||
|
{
|
||||||
|
uh_close_wkey(); // used by external programs
|
||||||
|
uh_open_wkey(); // used by external programs
|
||||||
|
}
|
||||||
|
|
||||||
|
void never_used()
|
||||||
|
{
|
||||||
|
adat_mode_anr2rnr();
|
||||||
|
adat_parse_vfo();
|
||||||
|
adat_ptt_rnr2anr();
|
||||||
|
amp_ext_level_foreach();
|
||||||
|
amp_ext_lookup_tok();
|
||||||
|
amp_ext_parm_foreach();
|
||||||
|
amp_ext_token_lookup();
|
||||||
|
amp_probe_all();
|
||||||
|
amp_set_powerstat();
|
||||||
|
amp_token_foreach();
|
||||||
|
amp_unregister();
|
||||||
|
cm108_dcd_get();
|
||||||
|
elad_close();
|
||||||
|
elad_get_channel();
|
||||||
|
elad_get_ctcss_sql();
|
||||||
|
elad_get_ctcss_tone();
|
||||||
|
elad_get_ext_parm();
|
||||||
|
elad_get_info();
|
||||||
|
elad_get_level();
|
||||||
|
elad_get_mem();
|
||||||
|
elad_get_mem_if();
|
||||||
|
elad_get_mode_if();
|
||||||
|
elad_open();
|
||||||
|
elad_send_morse();
|
||||||
|
elad_set_ant_no_ack();
|
||||||
|
elad_set_channel();
|
||||||
|
elad_set_ctcss_sql();
|
||||||
|
elad_set_ctcss_tone();
|
||||||
|
elad_set_ctcss_tone_tn();
|
||||||
|
elad_set_ext_parm();
|
||||||
|
elad_set_level();
|
||||||
|
elad_set_mem();
|
||||||
|
elad_set_ptt_safe();
|
||||||
|
elad_set_split();
|
||||||
|
elad_vfo_op();
|
||||||
|
flushBuffer();
|
||||||
|
foreach_opened_amp();
|
||||||
|
foreach_opened_rot();
|
||||||
|
get_output_freq();
|
||||||
|
getopt_long_only();
|
||||||
|
gp2000_get_func();
|
||||||
|
gp2000_set_func();
|
||||||
|
hzToPBS();
|
||||||
|
i2c_read();
|
||||||
|
ic10_set_ptt();
|
||||||
|
ic9100_get_level();
|
||||||
|
ic9100_set_level();
|
||||||
|
icmarine_open();
|
||||||
|
icom_get_vfo();
|
||||||
|
icom_set_dsp_flt();
|
||||||
|
int2BCD();
|
||||||
|
is_uh_radio_fd();
|
||||||
|
lt_dladdsearchdir();
|
||||||
|
lt_dlclose();
|
||||||
|
lt_dlerror();
|
||||||
|
lt_dlexit();
|
||||||
|
lt_dlinit();
|
||||||
|
lt_dlopen();
|
||||||
|
lt_dlopenext();
|
||||||
|
lt_dlsym();
|
||||||
|
miniVNA_get_info();
|
||||||
|
newcat_decode_event();
|
||||||
|
newcat_get_dcd();
|
||||||
|
newcat_get_dcs_code();
|
||||||
|
newcat_get_dcs_sql();
|
||||||
|
newcat_get_ext_level();
|
||||||
|
newcat_get_ext_parm();
|
||||||
|
newcat_get_parm();
|
||||||
|
newcat_get_rptr_offs();
|
||||||
|
newcat_get_split_freq();
|
||||||
|
newcat_get_split_mode();
|
||||||
|
newcat_get_tone();
|
||||||
|
newcat_get_tone_sql();
|
||||||
|
newcat_recv_dtmf();
|
||||||
|
newcat_reset();
|
||||||
|
newcat_scan();
|
||||||
|
newcat_send_dtmf();
|
||||||
|
newcat_send_morse();
|
||||||
|
newcat_set_bank();
|
||||||
|
newcat_set_dcs_code();
|
||||||
|
newcat_set_dcs_sql();
|
||||||
|
newcat_set_ext_level();
|
||||||
|
newcat_set_ext_parm();
|
||||||
|
newcat_set_parm();
|
||||||
|
newcat_set_rptr_offs();
|
||||||
|
newcat_set_split_freq();
|
||||||
|
newcat_set_split_mode();
|
||||||
|
newcat_set_tone();
|
||||||
|
newcat_set_tone_sql();
|
||||||
|
pll_locked_p();
|
||||||
|
readInt();
|
||||||
|
read_info();
|
||||||
|
rig_copy_channel();
|
||||||
|
rig_copyright();
|
||||||
|
rig_ext_token_lookup();
|
||||||
|
rig_get_mem_all();
|
||||||
|
rig_get_mem_all_cb();
|
||||||
|
rig_license();
|
||||||
|
rig_mem_count();
|
||||||
|
rig_parse_mtype();
|
||||||
|
rig_probe_all();
|
||||||
|
rig_set_bank();
|
||||||
|
rig_set_debug_callback();
|
||||||
|
rig_set_debug_file();
|
||||||
|
rig_set_mem_all();
|
||||||
|
rig_set_mem_all_cb();
|
||||||
|
rig_set_pltune_callback();
|
||||||
|
rig_unregister();
|
||||||
|
rig_version();
|
||||||
|
rot_probe_all();
|
||||||
|
rot_unregister();
|
||||||
|
set_parm_all_cb_generic();
|
||||||
|
tentec_trx_open();
|
||||||
|
thd72_get_chan_all_cb();
|
||||||
|
thd74_get_chan_all_cb();
|
||||||
|
writeInt();
|
||||||
|
write_both_dacs();
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
used_externally();
|
||||||
|
never_used();
|
||||||
|
}
|
Ładowanie…
Reference in New Issue