Fix some compiler warnings
This commit is contained in:
@ -5,13 +5,13 @@ struct termios toptions;
|
|||||||
void sWrite(int port, char string[], size_t length)
|
void sWrite(int port, char string[], size_t length)
|
||||||
{
|
{
|
||||||
if(port != -1) write(port, string, 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)
|
void sWrite(int port, const char string[], size_t length)
|
||||||
{
|
{
|
||||||
if(port != -1) write(port, string, 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)
|
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");
|
perror("init_serialport: Couldn't get term attributes");
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
cfsetispeed(&toptions, baud);
|
cfsetispeed(&toptions, baud);
|
||||||
cfsetospeed(&toptions, baud);
|
cfsetospeed(&toptions, baud);
|
||||||
// 8N1
|
// 8N1
|
||||||
|
Reference in New Issue
Block a user