Private
Public Access
2
0

arm: fix compiler warnings

There were unused variables, incorrect pointer operations
and plan broken string comparison.

Now there's only one - for unused uart3_enabled in beaglebone.c,
but we want to keep it for declaration consistency.

Also fixes #757.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
This commit is contained in:
Alex Tereschenko
2017-08-10 21:08:44 +02:00
parent c4e23e1a41
commit ba72c5b089
7 changed files with 19 additions and 21 deletions

View File

@@ -207,13 +207,14 @@ mraa_beaglebone_uart_init_pre(int index)
if (!mraa_file_exist(devpath)) {
ret = MRAA_ERROR_INVALID_HANDLE;
}
if (mraa_file_exist(devpath))
if (mraa_file_exist(devpath)) {
if (set_pin_mode(plat->uart_dev[index].rx, "uart") == MRAA_SUCCESS &&
set_pin_mode(plat->uart_dev[index].tx, "uart") == MRAA_SUCCESS) {
return MRAA_SUCCESS;
}
else
} else {
syslog(LOG_ERR, "uart: Device not initialized");
}
return ret;
}