Fix some compiler warnings
This commit is contained in:
parent
da117507f2
commit
e07866b906
@ -5,13 +5,13 @@ struct termios toptions;
|
||||
void sWrite(int port, char string[], size_t length)
|
||||
{
|
||||
if(port != -1) write(port, string, length);
|
||||
else for( int j = 0; j < length; j++ )std::cout<<string[j];
|
||||
else for( size_t j = 0; j < length; j++ )std::cout<<string[j];
|
||||
}
|
||||
|
||||
void sWrite(int port, const char string[], size_t length)
|
||||
{
|
||||
if(port != -1) write(port, string, length);
|
||||
else for( int j = 0; j < length; j++ )std::cout<<string[j];
|
||||
else for( size_t j = 0; j < length; j++ )std::cout<<string[j];
|
||||
}
|
||||
|
||||
ssize_t sRead(int port, void *buf, size_t count)
|
||||
@ -33,7 +33,7 @@ int serialport_init(const char* device, int baud)
|
||||
{
|
||||
perror("init_serialport: Couldn't get term attributes");
|
||||
return -1;
|
||||
|
||||
}
|
||||
cfsetispeed(&toptions, baud);
|
||||
cfsetospeed(&toptions, baud);
|
||||
// 8N1
|
||||
|
Loading…
x
Reference in New Issue
Block a user