Thw warning was:
CC meade.lo
../../hamlib/meade/meade.c:226:8: warning: using integer absolute value function 'abs' when argument is of floating point type
[-Wabsolute-value]
if(abs(az - priv->target_az) > 5 || abs(el - priv->target_el) > 5)
^
../../hamlib/meade/meade.c:226:8: note: use function 'fabsf' instead
if(abs(az - priv->target_az) > 5 || abs(el - priv->target_el) > 5)
^~~
fabsf
../../hamlib/meade/meade.c:226:41: warning: using integer absolute value function 'abs' when argument is of floating point
type [-Wabsolute-value]
if(abs(az - priv->target_az) > 5 || abs(el - priv->target_el) > 5)
^
../../hamlib/meade/meade.c:226:41: note: use function 'fabsf' instead
if(abs(az - priv->target_az) > 5 || abs(el - priv->target_el) > 5)
^~~
fabsf
2 warnings generated.
The warning was:
CC optoscan.lo
../../hamlib/icom/optoscan.c:738:14: warning: absolute value function 'abs' given an argument of type 'long' but has parameter
of type 'int' which may cause truncation of value [-Wabsolute-value]
usec_diff = abs((state->timer_current.tv_usec) -
^
../../hamlib/icom/optoscan.c:738:14: note: use function 'labs' instead
usec_diff = abs((state->timer_current.tv_usec) -
^~~
labs
1 warning generated.
On Debian Buster gcc ((Debian 8.2.0-8) 8.2.0) was throwing the following
warnings:
CC funcube.lo
../../hamlib/kit/funcube.c: In function ‘funcubepro_get_level’:
../../hamlib/kit/funcube.c:783:87: warning: ‘au8BufOut[3]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__func__, au8BufOut[0] & 0xFF, au8BufOut[1] & 0xFF, au8BufOut[2] & 0xFF, au8BufOut[3] & 0xFF);
~~~~~~~~~^~~
../../hamlib/kit/funcube.c:783:66: warning: ‘au8BufOut[2]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__func__, au8BufOut[0] & 0xFF, au8BufOut[1] & 0xFF, au8BufOut[2] & 0xFF, au8BufOut[3] & 0xFF);
~~~~~~~~~^~~
../../hamlib/kit/funcube.c:783:45: warning: ‘au8BufOut[1]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__func__, au8BufOut[0] & 0xFF, au8BufOut[1] & 0xFF, au8BufOut[2] & 0xFF, au8BufOut[3] & 0xFF);
~~~~~~~~~^~~
../../hamlib/kit/funcube.c: In function ‘funcubepro_set_level’:
../../hamlib/kit/funcube.c:730:87: warning: ‘au8BufOut[3]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__func__, au8BufOut[0] & 0xFF, au8BufOut[1] & 0xFF, au8BufOut[2] & 0xFF, au8BufOut[3] & 0xFF);
~~~~~~~~~^~~
../../hamlib/kit/funcube.c:730:66: warning: ‘au8BufOut[2]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__func__, au8BufOut[0] & 0xFF, au8BufOut[1] & 0xFF, au8BufOut[2] & 0xFF, au8BufOut[3] & 0xFF);
~~~~~~~~~^~~
Initialize au8BufOut and au8BufIn to 0 to quell the warning.
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.
On Debian Buster gcc ((Debian 8.2.0-8) 8.2.0) was throwing the following
warning:
CC network.lo
../../hamlib/src/network.c: In function ‘network_open’:
../../hamlib/src/network.c:245:46: warning: ‘%s’ directive output may be truncated writing up to 511 bytes into a region of size 139 [-Wformat-truncation=]
snprintf(msg,sizeof(msg),"connect to %s failed, (trying next interface)",rp->pathname);
^~
../../hamlib/src/network.c:245:9: note: ‘snprintf’ output between 44 and 555 bytes into a destination of size 150
snprintf(msg,sizeof(msg),"connect to %s failed, (trying next interface)",rp->pathname);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Raising the size of the msg buffer to 1024 quelled the warning.
On Debian Buster gcc ((Debian 8.2.0-8) 8.2.0) was throwing the following
warning:
CC ft991.lo
../../hamlib/yaesu/ft991.c: In function ‘ft991_set_split_mode’:
../../hamlib/yaesu/ft991.c:336:5: warning: ‘strncat’ output may be truncated copying 128 bytes from a string of length 128 [-Wstringop-truncation]
strncat (restore_commands, priv->ret_data, NEWCAT_DATA_LEN-1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At least now the warning is gone...
The Texinfo manual is now kept in sync with the project information
manual pages. The Texinfo manual may be retired at some later date but
for now the two sets of documentation will be kept in sync.
* Added new rotor module (18) for Meade telescope rotors
* Implemented all needed rotor functions
* Added README.md
* Tested with DS-2000 Rotor with Autostar 494 and 506 serial cable
* Tested on Linux (Debian) with rotctl and gpredict