Skip to content

Suppress some "'noreturn' function does return" warnings#373

Merged
xiaoxiang781216 merged 2 commits intoapache:masterfrom
yamt:noreturn
Feb 25, 2020
Merged

Suppress some "'noreturn' function does return" warnings#373
xiaoxiang781216 merged 2 commits intoapache:masterfrom
yamt:noreturn

Conversation

@yamt
Copy link
Copy Markdown
Contributor

@yamt yamt commented Feb 25, 2020

No description provided.


sys_call2(SYS_pthread_start, (uintptr_t)entrypt, (uintptr_t)arg);

PANIC();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But don't see who declare up_pthread_start/up_task_start as noreturn_function

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include/nuttx/arch.h has their prototypes with noreturn_function.

Copy link
Copy Markdown
Contributor

@xiaoxiang781216 xiaoxiang781216 Feb 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, we need to change all location to ensure the warning get clear for all arch or remove noreturn_function from the function declaration.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

fprintf(stream, "/* Auto-generated %s proxy file -- do not edit */\n\n", g_parm[NAME_INDEX]);
fprintf(stream, "#include <nuttx/config.h>\n");

/* Suppress "'noreturn' function does return" warnings. */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Suppress "'noreturn' function does return" warnings. */
/* Suppress "'noreturn' function does return" warnings. */

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@xiaoxiang781216 xiaoxiang781216 merged commit d526289 into apache:master Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants