Fix GCC warnings on Linux.
This commit is contained in:
@@ -24,7 +24,7 @@ LightsDriver_Linux_PIUIO::LightsDriver_Linux_PIUIO()
|
||||
fd = open("/dev/piuio0", O_WRONLY);
|
||||
if( fd < 0 )
|
||||
{
|
||||
LOG->Warn( "Error opening serial port for lights. Error:: %d %s", errno, strerror(errno) );
|
||||
LOG->Warn( "Error opening serial port for lights. Error: %d %s", errno, strerror(errno) );
|
||||
return;
|
||||
}
|
||||
LOG->Info("Opened PIUIO device for lights");
|
||||
@@ -75,7 +75,11 @@ void LightsDriver_Linux_PIUIO::Set( const LightsState *ls )
|
||||
return;
|
||||
memcpy(oldbuf, buf, 8);
|
||||
|
||||
write(fd, buf, 8);
|
||||
if (write(fd, buf, 8) != 8)
|
||||
{
|
||||
LOG->Warn( "Error setting lights state. Error: %d %s", errno, strerror(errno) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user