GCC 15.2: -Wformat-y2k warning in H5_get_localtime_str ('%c' yields only last 2 digits of year in some locales)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 82/100
Research direction
Start in src/H5system.c at H5_get_localtime_str(), where the issue identifies strftime()'s '%c' format as the source of the GCC 15.2 warning. Check the function's existing tests or build instructions, then confirm the warning is gone after using a locale-independent format. Done when the function avoids the warning and its timestamp output uses the selected format.
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).
The HDF5 develop branch compiled with GCC 15 emits:
src/H5system.c:243:33: warning: '%c' yields only last 2 digits of year in some locales [-Wformat-y2k]
The warning originates from H5_get_localtime_str() using strftime() with the '%c' format specifier, which is locale-dependent and may format the year with only 2 digits (Y2K issue).
Suggested fix: Replace '%c' with a locale-independent format such as '%Y-%m-%d %H:%M:%S' or '%Y%m%d' to avoid the y2k warning.
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
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/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 ·