Skip to content

Commit

Permalink
examples/power, examples/uart_loopback: fix build warnings
Browse files Browse the repository at this point in the history
power_main.c:210:49: warning: passing argument 4 of 'task_create' from incompatible pointer type
	Fix: function 'start_pm_test(void)' must be of 'main_t' type.

uart_loopback.c:97:12: warning: assignment to 'char *' from incompatible pointer type
	Fix: assignment to pointer 'char *read_ptr' should be typecast to 'char *'

	- return statement in function 'uart_loopback_task' was missing.
	- removed unused variable 'ret' in function 'uart_loopback_main'
  • Loading branch information
samsung-singh authored and r-prabu committed Jan 7, 2025
1 parent 869e7a2 commit 42a022a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/examples/power/power_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static int pm_suspend_resume_test(void)
return 0;
}

static int start_pm_test(void)
static int start_pm_test(int argc, char *argv[])
{
pthread_t suspend_resume_tid;
int ret;
Expand Down
4 changes: 2 additions & 2 deletions apps/examples/uart_loopback/uart_loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static int uart_rx_loop(void)

while (is_running) {
rx_test_count++;
read_ptr = &read_buf;
read_ptr = (char *)&read_buf;
remain_size = TEST_STR_LEN;

while (0 < remain_size) {
Expand Down Expand Up @@ -173,6 +173,7 @@ static int uart_loopback_task(int argc, char *argv[])
}

printf("######################### UART loopback test END ###########################\n");
return ret;
}


Expand All @@ -182,7 +183,6 @@ int main(int argc, FAR char *argv[])
int uart_loopback_main(int argc, char **argv)
#endif
{
int ret;
int pid;

if (argc != 2 || strncmp(argv[1], "help", 5) == 0) {
Expand Down

0 comments on commit 42a022a

Please sign in to comment.