kopia lustrzana https://github.com/Hamlib/Hamlib
Fix compiler warnings
rodzic
181a3e9697
commit
ca7cbd89f4
|
@ -118,7 +118,7 @@ int network_open(hamlib_port_t *rp, int default_port)
|
||||||
int fd; /* File descriptor for the port */
|
int fd; /* File descriptor for the port */
|
||||||
int status;
|
int status;
|
||||||
struct addrinfo hints, *res, *saved_res;
|
struct addrinfo hints, *res, *saved_res;
|
||||||
char *hoststr, *portstr, *bracketstr1, *bracketstr2;
|
char *hoststr = NULL, *portstr = NULL, *bracketstr1, *bracketstr2;
|
||||||
char hostname[FILPATHLEN];
|
char hostname[FILPATHLEN];
|
||||||
char defaultportstr[8];
|
char defaultportstr[8];
|
||||||
|
|
||||||
|
@ -171,11 +171,11 @@ int network_open(hamlib_port_t *rp, int default_port)
|
||||||
{
|
{
|
||||||
*portstr++ = '\0';
|
*portstr++ = '\0';
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
if (!portstr)
|
||||||
sprintf(defaultportstr, "%d", default_port);
|
{
|
||||||
portstr = defaultportstr;
|
sprintf(defaultportstr, "%d", default_port);
|
||||||
}
|
portstr = defaultportstr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,6 @@ int main (int argc, char *argv[])
|
||||||
char *civaddr = NULL; /* NULL means no need to set conf */
|
char *civaddr = NULL; /* NULL means no need to set conf */
|
||||||
char conf_parms[MAXCONFLEN] = "";
|
char conf_parms[MAXCONFLEN] = "";
|
||||||
|
|
||||||
int sockopt;
|
|
||||||
struct addrinfo hints, *result, *saved_result;
|
struct addrinfo hints, *result, *saved_result;
|
||||||
int sock_listen;
|
int sock_listen;
|
||||||
int reuseaddr = 1;
|
int reuseaddr = 1;
|
||||||
|
@ -403,7 +402,7 @@ int main (int argc, char *argv[])
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
sockopt = SO_SYNCHRONOUS_NONALERT;
|
int sockopt = SO_SYNCHRONOUS_NONALERT;
|
||||||
setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&sockopt, sizeof(sockopt));
|
setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&sockopt, sizeof(sockopt));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue