GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 73/100
Research direction
Start in src/H5trace.c at line 253 and inspect the cast that GCC 15.2 reports under -Wcast-qual. Check how the pointer is used nearby, then choose a const-correct change or document why the cast is intentional. Rebuild the matio OSS-Fuzz configuration referenced in the issue and confirm the warning is resolved.
Written by the indexing model from the issue text.
Description
From matio OSS-Fuzz build on Ubuntu 26.04 with GCC 15.2 (run 43303909994/job/131482003978).
GCC 15.2 emits a -Wcast-qual warning where a cast explicitly discards a const qualifier from a pointer target type:
src/H5trace.c:253:24: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
Suggested fix: Replace explicit const-cast with a const-correct design (use const-qualified locals instead of discarding const), or add explanatory comments if intentional const-cast is required.
Reference: https://github.com/tbeu/matio/actions/runs/43303909994/job/131482003978
- Dominant language
- C
- Stars
- 1k
- Forks
- 372
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 57
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HDFGroup/hdf5
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
H5EA header deserialize computes index block statistics from nsblks before H5EA__hdr_init sets itPossibly taken @vchoi-hdfgroup claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
HDFGroup/hdf5#6869 · 1 assignee ·
Maintainers usually reply within 1 day
-
hdf5_hl_fortran.pc doesn't require hdf5_hl, so static high-level Fortran links failPossibly taken @jhendersonHDF claimed this 13 days ago. OpenComponent - Build
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
HDFGroup/hdf5#6819 · 1 assignee ·
Maintainers usually reply within 1 day
-
Bug reports by unicorn0016 are now visible after being incorrectly flagged as spamMay be free again @glennsong09 claimed this 31 days ago, and no pull request is open. Open
Difficulty 1/5 Under an hour Newbie friendliness 70/100
HDFGroup/hdf5#6719 · 1 assignee ·
Maintainers usually reply within 1 day
-
`check_required_components()` in HDF5's CMake package configuration file doesn't functionMay be free again @mattjala claimed this 48 days ago, and no pull request is open. OpenComponent - Build
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
HDFGroup/hdf5#6690 · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
awslabs/aws-c-auth#315 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#2365 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
ChupathingyCE/chupathingyce#1128 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
php/pecl-networking-ssh2#111 ·