Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdio.h:remove <nuttx/xxx.h> #2845

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Conversation

anjiahao1
Copy link
Contributor

Summary

stdio.h:remove <nuttx/xxx.h>

Impact

all use stdio.h

Testing

sim:citest build and sim:nsh build

apache/nuttx#14697 Associated PR

libuv:
CC:  pthread/pthread_mutexattr_setrobust.c libuv/src/unix/thread.c: In function ‘uv_thread_create_ex’:
libuv/src/unix/thread.c:174:24: error: storage size of ‘param’ isn’t known
  174 |     struct sched_param param;
      |                        ^~~~~

btsak_main:
In file included from btsak_main.c:39:
btsak.h:149:1: error: unknown type name ‘bool’
  149 | bool btsak_str2bool(FAR const char *str);

pipe_main.c:
CC:  sim/sim_registerdump.c pipe_main.c:44:30: error: unknown type name ‘pthread_addr_t’
   44 | static void *open_write_only(pthread_addr_t pvarg)
      |                              ^~~~~~~~~~~~~~
pipe_main.c: In function ‘pipe_main’:
pipe_main.c:81:3: error: unknown type name ‘pthread_t’
   81 |   pthread_t writeonly;

redirect_test.c: In function ‘redirection_test’:
redirect_test.c:205:3: error: unknown type name ‘pthread_t’
  205 |   pthread_t readerid;
      |   ^~~~~~~~~
redirect_test.c:206:3: error: unknown type name ‘pthread_t’
  206 |   pthread_t writerid;
      |   ^~~~~~~~~

drivertest_posix_timer.c:48:29: error: ‘optarg’ undeclared (first use in this function)
   48 |       value = (type)strtoul(optarg, &ptr, base);                      \

drivertest_posix_timer.c:208:3: warning: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration]
  208 |   sleep(SLEEPSECONDS);
      |   ^~~~~

drivertest_uart.c:92:13: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration]
   92 |       len = read(fd, &tmp_char, 1);
      |             ^~~~
      |             fread

drivertest_uart.c:323:44: error: ‘optopt’ undeclared (first use in this function)
  323 |             printf("Unknown option: %c\n", optopt);

kernel/fs/cases/fs_getfilep_test.c:71:9: warning: implicit declaration of function ‘fs_getfilep’ [-Wimplicit-function-declaration]
   71 |   ret = fs_getfilep(fileno(fp), &filep);
      |         ^~~~~~~~~~~

kernel/mm/cases/mm_test_008.c:148:9: warning: implicit declaration of function ‘task_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration]
  148 |   pid = task_create("TestNuttx08_routine_1",
      |         ^~~~~~~~~~~
      |         timer_create

/home/ajh/work/nuttxwork/apps/testing/cmocka/cmocka_main.c:171:11: warning: implicit declaration of function ‘setenv’ [-Wimplicit-function-declaration]
  171 |           setenv("CMOCKA_XML_FILE", xml_path, 1);
      |           ^~~~~~

drivertest_pm_runtime.c:123:7: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
  123 |       usleep(210 * 1000);
      |       ^~~~~~

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
@nuttxpr
Copy link

nuttxpr commented Nov 13, 2024

[Experimental Bot, please feedback here]

No, this PR does not fully meet the NuttX requirements. While it provides a summary and mentions testing, it lacks crucial information. Here's a breakdown:

  • Insufficient Summary: "stdio.h:remove <nuttx/xxx.h>" is vague. Which nuttx/xxx.h file was removed? Why was it removed? What problem did it solve? What functionality does this change? This needs significant expansion.

  • Impact Section Severely Lacking: The statement "all use stdio.h" doesn't explain the impact. It needs to address all the points in the template, even if the answer is "NO." Explicitly stating "NO" with brief justification is better than silence. For example:

    • Impact on user: NO (This is an internal header change and should not affect user applications directly).
    • Impact on build: Potentially YES (If any code relied on the removed include, it might now fail to compile. This needs investigation and explanation).
    • Impact on hardware: NO (This change does not affect hardware directly).
    • ...and so on for all impact categories.
  • Testing Insufficient: "sim:citest build and sim:nsh build" is too brief. Provide actual log output (even if it's just a successful build message). What tests were run within citest and nsh to confirm the change works correctly and doesn't break anything? More details are needed about the build host as well.

  • Missing "Before" Logs: The template requires "Testing logs before change," which are absent.

In short, the PR needs to be much more thorough in explaining the context, rationale, impact, and testing results. Simply stating what changed isn't enough; it needs to justify why the change is necessary and demonstrate that it has been thoroughly vetted.

@xiaoxiang781216 xiaoxiang781216 merged commit 59855a1 into apache:master Nov 13, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants