Skip to content

Conversation

@extinguish
Copy link
Contributor

@extinguish extinguish commented Sep 19, 2024

Summary

fix the greenhills build warning on enum data type manage.

the following are the detailed warning info:
CC: obstack/lib_obstack_printf.c "mmap/fs_rammap.c", line 126: warning #188-D: enumerated type mixed with
another type
enum mm_map_type_e type = (uintptr_t)entry->priv.p & 3;
^

In greenhills compiler, do not allow enum mixed with another type, so we need to perform cast between enum and the truly used data type.

Impact

has no impact on the function

Testing

has passed the full ostest with gcc/greenhills compiler

CC:  obstack/lib_obstack_printf.c "mmap/fs_rammap.c", line 126: warning apache#188-D: enumerated type mixed with
          another type
    enum mm_map_type_e type = (uintptr_t)entry->priv.p & 3;
                              ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
@lupyuen
Copy link
Member

lupyuen commented Sep 19, 2024

[Experimental Bot, please feedback here]

Let's evaluate this PR against the NuttX requirements:

Summary:

  • Adequate: The summary explains the "why" (fixing a build warning) and the "what" (enum type handling in a specific file/line).
  • Missing: It lacks a clear explanation of "how" the change addresses the warning. A brief description of the fix would be beneficial.

Impact:

  • Incomplete: This section is entirely empty. You must address each impact point. Since this seems like a bug fix, most will likely be "NO," but you still need to state that explicitly. If there's any potential for side effects, even minor ones, mention them.

Testing:

  • Insufficient:
    • You haven't provided any build host or target details. Be specific: OS versions, compiler versions, architecture, board names, etc.
    • The log sections are empty. Include relevant snippets showing the warning before the fix and its absence afterward.

In short, this PR does not yet meet the NuttX Requirements. You need to:

  1. Improve the Summary: Briefly explain your solution to the warning.
  2. Complete the Impact Section: Go through each point, even if it's just to say "NO."
  3. Provide Detailed Testing Information: List your build environment and target(s), and include relevant log snippets.

@anchao anchao merged commit f01a2c7 into apache:master Sep 19, 2024
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.

4 participants