Browse Source

Fixing some warnings

pull/39/head
leeboby 4 years ago
parent
commit
51b2359c0d
  1. 10
      gpio/gpio.c
  2. 2
      wiringPi/drcNet.c
  3. 2
      wiringPi/mcp3422.c
  4. 3
      wiringPi/pcf8591.c

10
gpio/gpio.c

@ -309,13 +309,13 @@ static void doLoad (int argc, char *argv [])
if (!moduleLoaded (module1))
{
sprintf (cmd, "%s %s%s", findExecutable (MODPROBE), module1, args1) ;
system (cmd) ;
if ( system (cmd) ){;}
}
if (!moduleLoaded (module2))
{
sprintf (cmd, "%s %s%s", findExecutable (MODPROBE), module2, args2) ;
system (cmd) ;
if ( system (cmd) ){;}
}
if (!moduleLoaded (module2))
@ -369,13 +369,13 @@ static void doUnLoad (int argc, char *argv [])
if (moduleLoaded (module1))
{
sprintf (cmd, "%s %s", findExecutable (RMMOD), module1) ;
system (cmd) ;
if ( system (cmd) ){;}
}
if (moduleLoaded (module2))
{
sprintf (cmd, "%s %s", findExecutable (RMMOD), module2) ;
system (cmd) ;
if ( system (cmd) ){;}
}
}
@ -1428,7 +1428,7 @@ static void doVersion (char *argv [])
{
if ((fd = fopen ("/proc/device-tree/model", "r")) != NULL)
{
fgets (name, 80, fd) ;
if ( fgets (name, 80, fd) ){;}
fclose (fd) ;
printf (" *--> %s\n", name) ;
}

2
wiringPi/drcNet.c

@ -104,7 +104,7 @@ static int authenticate (int fd, const char *pass)
{
char *challenge ;
char *encrypted ;
char salted [1024] ;
char salted [1034] ;
if ((challenge = getChallenge (fd)) == NULL)
return -1 ;

2
wiringPi/mcp3422.c

@ -47,7 +47,7 @@ void waitForConversion (int fd, unsigned char *buffer, int n)
{
for (;;)
{
read (fd, buffer, n) ;
if ( read (fd, buffer, n) ){;}
if ((buffer [n-1] & 0x80) == 0)
break ;
delay (1) ;

3
wiringPi/pcf8591.c

@ -41,7 +41,8 @@ static void myAnalogWrite (struct wiringPiNodeStruct *node, UNU int pin, int val
unsigned char b [2] ;
b [0] = 0x40 ;
b [1] = value & 0xFF ;
write (node->fd, b, 2) ;
if ( write (node->fd, b, 2) ){;}
}
/*

Loading…
Cancel
Save