checkedc icon indicating copy to clipboard operation
checkedc copied to clipboard

function without a prototype cannot be used or declared in a checked scope

Open Arslan8 opened this issue 3 years ago • 0 comments

Hi, I am trying to compile a function using checkedC, however, i keep getting the missing prototype error.

/home/arslan/zephyrproject/zephyr/samples/hello_world/src/main.c:13:1: error: function without a prototype cannot be used or declared in a checked scope
static void getCommand();
^
/home/arslan/zephyrproject/zephyr/samples/hello_world/src/main.c:15:1: error: function without a prototype cannot be used or declared in a checked scope
static void getCommand() {
^

On some digging, adding a void parameter to the function argument fixed the problem. I am wondering if the error message is accurate here, or am i missing something?

Arslan8 avatar Sep 29 '21 05:09 Arslan8