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

fix the misra check issues #13629

Merged
merged 4 commits into from
Sep 26, 2024
Merged

Conversation

extinguish
Copy link

Summary

  1. fix the moblib_bind variable uninit misra issue
  2. remove the unreached dead code in pthread_mutexattr_setprotocol
  3. fix using the uninit value misra issue in hcreate
  4. fix the ret value not check erro on fs_fcntl

Impact

Testing

  1. has pass the ostest
  2. has checked on ghs and gcc compiler

@github-actions github-actions bot added Area: File System File System issues Area: OS Components OS Components issues Size: S The size of the change in this PR is small labels Sep 26, 2024
@nuttxpr
Copy link

nuttxpr commented Sep 26, 2024

[Experimental Bot, please feedback here]

This PR summary is insufficient and it does not meet the NuttX Requirements. Here's why and how to fix it:

What's Missing & How to Fix It:

  • Summary:

    • Be Specific: Instead of just stating "fix the moblib_bind variable uninit misra issue," explain what moblib_bind is, where it's used, and why initializing it is important. For example: "Fixes an uninitialized variable issue in the moblib_bind function used by [explain functionality]. This uninitialized variable could lead to unpredictable behavior during [explain scenario]."
    • Provide Context for Each Change: Do this for ALL listed changes (dead code removal, hcreate issue, fs_fcntl issue, etc.). Explain the potential consequences of the original bugs.
    • Issue References: If these fixes address specific issues, include the issue numbers (e.g., "Fixes arch/stackframe: fix heap buffer overflow #1234").
  • Impact:

    • You must address each impact category: Even if the answer is "NO", state it explicitly (e.g., "Impact on build: NO").
    • Provide Details When Applicable: For example, if a change impacts a specific architecture (like ARM), mention it.
    • User Impact is Crucial: If any change affects how users interact with NuttX, this section needs a detailed explanation.
  • Testing:

    • Insufficient Information:
      • Build Hosts: Specify the exact operating systems and versions used for testing (e.g., "Ubuntu 20.04," "macOS 12.4").
      • Target(s): Provide the full architecture and board configurations. For example, "sim:qemu-arm" or "ARM:STM32F4 Discovery board".
      • Testing Logs: The logs you've provided are placeholders. Include the actual relevant log output from your tests, both before and after the changes.
      • Test Cases: Briefly describe the specific tests you ran to verify the changes (e.g., "Ran network tests to confirm moblib_bind fix," "Performed file system stress tests").

Example of an Improved Summary Point:

Instead of:

  1. fix the moblib_bind variable uninit misra issue

Write something like:

  1. Fixes an uninitialized variable issue in the moblib_bind function, which is responsible for [explain function's purpose, e.g., binding network sockets to specific interfaces]. Leaving this variable uninitialized could lead to non-deterministic behavior, potentially causing network connectivity failures in certain scenarios. This addresses issue #[issue number, if applicable].

Remember: A good PR description is crucial for reviewers to understand your changes, assess their impact, and confidently merge them.

@xiaoxiang781216 xiaoxiang781216 merged commit 203944b into apache:master Sep 26, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: File System File System issues Area: OS Components OS Components issues Size: S The size of the change in this PR is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants