This found tons of errors in rig_debug statements
So this patch cleans up all the files that were producing warnings or errors
This should fix a few segfaults when running with debug turned on
The \chk_vfo command to rigctl_parse() accepts an extended response
prefix but does not act upon it, instead it is held over until the
next command. This seems unnecessary as an extended response prefix
can just as easily be added to the following command if required. By
removing this carried over state the processing of commands can be
greatly simplified as per this commit.
Virtual com ports providing a TS-2000 Emulator
Example connecting N1MM or such to FLRig via COM5/COM6 virtual COM pair
rigctlcom -m 4 -R COM5 -S 115200
N1MM connects to COM6 TS-2000 115200 8N1
The warning was:
CC rotctl_parse.o
../../hamlib/tests/rotctl_parse.c:1012:50: warning: format string is not a string literal (potentially insecure)
[-Wformat-security]
snprintf(cmd_name, sizeof(cmd_name), parsed_input[0] + 1);
^~~~~~~~~~~~~~~~~~~
../../hamlib/tests/rotctl_parse.c:1012:50: note: treat the string as an argument to avoid this
snprintf(cmd_name, sizeof(cmd_name), parsed_input[0] + 1);
^
"%s",
1 warning generated.
On Debian Buster gcc ((Debian 8.2.0-8) 8.2.0) was throwing the following
warning:
CC rigctl.o
../../hamlib/tests/rigctl.c:125:18: warning: ‘have_rl’ defined but not used [-Wunused-const-variable=]
static const int have_rl = 0;
^~~~~~~
and:
CC rotctl.o
../../hamlib/tests/rotctl.c:113:18: warning: ‘have_rl’ defined but not used [-Wunused-const-variable=]
static const int have_rl = 0;
^~~~~~~
Turns out I didn't have the readline-dev package installed. As the have_rl
variable is wrapped in CPP macros, it indeed is not used when readline is not
available.
As some content was getting dated, refresh the content of the various
manual pages and while doing so, update the pages to conform more
closely to man-pages(7), man(7), and groff_man(7).