RT-Thread / RT-Thread/rt-thread

memheap.c的_remove_next_ptr函数在IAR V9.32.1中报警告

Open
#7,313 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
12.2k
Forks
5.4k
Avg merge
4d 12h
Merged PRs (30d)
40

Description

memheap.c的_remove_next_ptr函数在IAR中报警告

  • 最新源码
  • 使用IAR 9.32.1
  • 编译后报警告如下Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement D:\huangly\code\rt-thread\src\memheap.c 46
  • 截图如下
    image

本来想修复的,但是看到注释里面Fix IAR compiler warning

  • 这个警告到底是修还是不修?
  • 这段代码之前是没有的,我认为应该是修复过警告了吧?
    image
  • 是不是我的IAR版本的问题?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/memheap.c at _remove_next_ptr and the warning reported on line 46, then review the nearby “Fix IAR compiler warning” comment and the referenced code history if available. Determine whether the warning reproduces with IAR 9.32.1 and whether the reported volatile-access issue requires a source change; done means the warning’s status and any needed fix are documented and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.