Fix compile warnings for src

pull/15/merge
Michael Black W9MDB 2018-04-16 10:38:47 -05:00 zatwierdzone przez Nate Bargmann
rodzic 20d1818af4
commit 1e883d0195
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -31,7 +31,7 @@
int gpio_open(hamlib_port_t *port, int on_value)
{
char pathname[FILPATHLEN];
char pathname[FILPATHLEN*2];
FILE *fexp, *fdir;
int fd;
@ -54,7 +54,7 @@ int gpio_open(hamlib_port_t *port, int on_value)
fclose(fexp);
snprintf(pathname,
FILPATHLEN,
sizeof(pathname),
"/sys/class/gpio/gpio%s/direction",
port->pathname);
fdir = fopen(pathname, "w");
@ -73,7 +73,7 @@ int gpio_open(hamlib_port_t *port, int on_value)
fclose(fdir);
snprintf(pathname,
FILPATHLEN,
sizeof(pathname),
"/sys/class/gpio/gpio%s/value",
port->pathname);
fd = open(pathname, O_WRONLY);

Wyświetl plik

@ -173,7 +173,7 @@ int network_open(hamlib_port_t *rp, int default_port)
{
if (strlen(rp->pathname))
{
strncpy(hostname, rp->pathname, FILPATHLEN - 1);
snprintf(hostname, sizeof(hostname), "%s", rp->pathname);
hoststr = hostname;
/* look for IPv6 numeric form [<addr>] */
bracketstr1 = strchr(hoststr, '[');