You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/12 06:57:11 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #3523: Protected build fix noreturn

xiaoxiang781216 commented on a change in pull request #3523:
URL: https://github.com/apache/incubator-nuttx/pull/3523#discussion_r611351524



##########
File path: include/sys/syscall_lookup.h
##########
@@ -261,6 +261,9 @@ SYSCALL_LOOKUP(telldir,                    1)
 
 #if defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0
   SYSCALL_LOOKUP(nx_pipe,                  3)
+#endif
+
+#if defined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE > 0
   SYSCALL_LOOKUP(nx_mkfifo,                3)

Review comment:
       no real difference?

##########
File path: tools/mksyscall.c
##########
@@ -497,14 +515,16 @@ static void generate_stub(int nfixed, int nparms)
    * value, just return zero (OK).
    */
 
-  if (strcmp(g_parm[RETTYPE_INDEX], "void") == 0)
+  fprintf(stream, ");\n");
+  if (strcmp(g_parm[RETTYPE_INDEX], "noreturn") == 0)
     {
-      fprintf(stream, ");\n  return 0;\n}\n");
+      fprintf(stream, "  PANIC();\n");

Review comment:
       Don't need because:
   1. We should trust the implementation of noreturn never return
   2. It waste the flash space for each PANIC




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org