diff --git a/examples/canard/canard_main.c b/examples/canard/canard_main.c index 8b14d96d6..d0ab0a7fd 100644 --- a/examples/canard/canard_main.c +++ b/examples/canard/canard_main.c @@ -425,10 +425,12 @@ void processTxRxOnce(CanardNuttXInstance * nuttxcan, int timeout_msec) static int canard_daemon(int argc, char *argv[]) { - int ret; - int errval = 0; - struct canioc_bittiming_s bt; static CanardNuttXInstance canardnuttx_instance; +#ifdef CONFIG_DEBUG_CAN + struct canioc_bittiming_s bt; +#endif + int errval = 0; + int ret; /* Initialization of the CAN hardware is performed by logic external to * this test. @@ -462,7 +464,7 @@ static int canard_daemon(int argc, char *argv[]) ret = ioctl(canardNuttXGetDeviceFileDescriptor(&canardnuttx_instance), - CANIOC_GET_BITTIMING, (unsigned long)((uintptr_t) & bt)); + CANIOC_GET_BITTIMING, (unsigned long)((uintptr_t)&bt)); if (ret < 0) { printf("canard_daemon: Bit timing not available: %d\n", errno); diff --git a/examples/pty_test/pty_test.c b/examples/pty_test/pty_test.c index 742873a1f..692482f71 100644 --- a/examples/pty_test/pty_test.c +++ b/examples/pty_test/pty_test.c @@ -200,7 +200,7 @@ static void serial_out(struct term_pair_s *tp) ret = poll((struct pollfd *)&fdp, 1, POLL_TIMEOUT); if (ret > 0) { - if ((fdp.revents & POLLIN != 0)) + if ((fdp.revents & POLLIN) != 0) #endif { ssize_t len;