kopia lustrzana https://github.com/Hamlib/Hamlib
Fix compile warnings for src
rodzic
20d1818af4
commit
1e883d0195
|
@ -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);
|
||||
|
|
|
@ -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, '[');
|
||||
|
|
Ładowanie…
Reference in New Issue