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 status;
|
||||
struct addrinfo hints, *res, *saved_res;
|
||||
char *hoststr, *portstr, *bracketstr1, *bracketstr2;
|
||||
char *hoststr = NULL, *portstr = NULL, *bracketstr1, *bracketstr2;
|
||||
char hostname[FILPATHLEN];
|
||||
char defaultportstr[8];
|
||||
|
||||
|
@ -171,11 +171,11 @@ int network_open(hamlib_port_t *rp, int default_port)
|
|||
{
|
||||
*portstr++ = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(defaultportstr, "%d", default_port);
|
||||
portstr = defaultportstr;
|
||||
}
|
||||
}
|
||||
if (!portstr)
|
||||
{
|
||||
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 conf_parms[MAXCONFLEN] = "";
|
||||
|
||||
int sockopt;
|
||||
struct addrinfo hints, *result, *saved_result;
|
||||
int sock_listen;
|
||||
int reuseaddr = 1;
|
||||
|
@ -403,7 +402,7 @@ int main (int argc, char *argv[])
|
|||
exit(1);
|
||||
}
|
||||
|
||||
sockopt = SO_SYNCHRONOUS_NONALERT;
|
||||
int sockopt = SO_SYNCHRONOUS_NONALERT;
|
||||
setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&sockopt, sizeof(sockopt));
|
||||
#endif
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue