Quell compiler warnings on Cygwin

Quell mostly harmless warnings from the older GCC installed in Cygwin.
Produces a quiet compilation.
Hamlib-3.0
Nate Bargmann 2013-05-09 22:06:39 -05:00
rodzic 6e104f14f2
commit 245ab86441
8 zmienionych plików z 17 dodań i 15 usunięć

Wyświetl plik

@ -594,7 +594,7 @@ size_t trimwhitespace( char *out, size_t len, const char *str )
}
// Trim leading space
while(isspace(*str)) str++;
while(isspace((int)*str)) str++;
if(*str == 0) // All spaces?
{
@ -605,7 +605,7 @@ size_t trimwhitespace( char *out, size_t len, const char *str )
// Trim trailing space
end = (char *)(str + strlen(str) - 1);
while(end > str && isspace(*end))
while(end > str && isspace((int)*end))
{
*end = '\0';
end--;
@ -732,7 +732,7 @@ int adat_parse_freq( char *pcStr,
// Get Freq Value from response string
while(( isalpha( *pcEnd ) == 0 ) ||
while(( isalpha( (int)*pcEnd ) == 0 ) ||
( *pcEnd == '.' ))
{
acValueBuf[ nI++ ] = *pcEnd;
@ -748,7 +748,7 @@ int adat_parse_freq( char *pcStr,
// Get Freq Unit from response string
nI = 0;
while( isalpha( *pcEnd ) != 0 )
while( isalpha( (int)*pcEnd ) != 0 )
{
acUnitBuf[ nI++ ] = *pcEnd;
pcEnd += sizeof( char );

Wyświetl plik

@ -53,7 +53,7 @@ int ic10_cmd_trim (char *data, int data_len) {
__func__, data_len);
/* suck up additional spaces at end of the data buffer */
for (i=data_len; !isdigit(data[i-1]); i--) {
for (i=data_len; !isdigit((int)data[i-1]); i--) {
data_len = data_len-1;
rig_debug(RIG_DEBUG_TRACE,"%s: data['%d'] is '%c'\n",
__func__, i-1, data[i-1]);

Wyświetl plik

@ -1297,7 +1297,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[2] == '0')
val->i = 0;
else if (isdigit(lvlbuf[2])) {
else if (isdigit((int)lvlbuf[2])) {
lvl = lvlbuf[2]-'0';
for (i=0; i<lvl && i<MAXDBLSTSIZ; i++) {
if (rig->state.preamp[i] == 0) {

Wyświetl plik

@ -420,7 +420,7 @@ static int rotorez_rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *e
} else if (err == AZ_READ_LEN && az[0] == ';') {
/* Check if remaining chars are digits if az[0] == ';' */
for (p = az + 1;p < az + 4; p++)
if (isdigit(*p))
if (isdigit((int)*p))
continue;
else
err = -RIG_EINVAL;
@ -493,14 +493,14 @@ static int erc_rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *eleva
/* Check if remaining chars are digits if az[3] == ';' */
if (az[3] == ';') {
for (p = az; p < az + 3; p++)
if (isdigit(*p))
if (isdigit((int)*p))
continue;
else
err = -RIG_EINVAL;
} else if (az[0] == ';') {
/* Check if remaining chars are digits if az[0] == ';' */
for (p = az + 1;p < az + 4; p++)
if (isdigit(*p))
if (isdigit((int)*p))
continue;
else
err = -RIG_EINVAL;

Wyświetl plik

@ -124,7 +124,9 @@
int par_open(hamlib_port_t *port)
{
int fd;
#ifdef HAVE_LINUX_PPDEV_H
int mode;
#endif
if (!port->pathname)
return -RIG_EINVAL;

Wyświetl plik

@ -918,7 +918,7 @@ const char *tt565_get_info(RIG *rig)
/* filter out any non-graphic characters */
for (i=0; i < strlen(buf); i++)
if (!isgraph(buf[i])) buf[i] = ' '; // bad chars -> spaces
if (!isgraph((int)buf[i])) buf[i] = ' '; // bad chars -> spaces
return buf;
}

Wyświetl plik

@ -724,7 +724,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc)
* alpha-numeric characters and the underscore ('_') character.
*/
for (j = 0; cmd_name[j] != '\0'; j++) {
if (!(isalnum(cmd_name[j]) || cmd_name[j] == '_')) {
if (!(isalnum((int)cmd_name[j]) || cmd_name[j] == '_')) {
fprintf(stderr, "Valid multiple character command names contain alpha-numeric characters plus '_'\n");
return 0;
}
@ -807,7 +807,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc)
#endif
/* Sanity check, VFO names are alpha only. */
for (j = 0; j < MAXNAMSIZ && parsed_input[x][j] != '\0'; j++) {
if (!(isalpha(parsed_input[x][j]))) {
if (!(isalpha((int)parsed_input[x][j]))) {
parsed_input[x][j] = '\0';
break;
@ -2106,7 +2106,7 @@ declare_proto_rig(set_channel)
memset(&chan, 0, sizeof(channel_t));
if (isdigit(arg1[0])) {
if (isdigit((int)arg1[0])) {
chan.vfo = RIG_VFO_MEM;
CHKSCN1ARG(sscanf(arg1, "%d", &chan.channel_num));
/*
@ -2280,7 +2280,7 @@ declare_proto_rig(get_channel)
memset(&chan, 0, sizeof(channel_t));
if (isdigit(arg1[0])) {
if (isdigit((int)arg1[0])) {
chan.vfo = RIG_VFO_MEM;
CHKSCN1ARG(sscanf(arg1, "%d", &chan.channel_num));
} else {

Wyświetl plik

@ -630,7 +630,7 @@ int rotctl_parse(ROT *my_rot, FILE *fin, FILE *fout, char *argv[], int argc)
* alpha-numeric characters and the underscore ('_') character.
*/
for (j = 0; cmd_name[j] != '\0'; j++) {
if (!(isalnum(cmd_name[j]) || cmd_name[j] == '_')) {
if (!(isalnum((int)cmd_name[j]) || cmd_name[j] == '_')) {
fprintf(stderr, "Valid multiple character command names contain alpha-numeric characters plus '_'\n");
return 0;
}