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

Array out of bounds warnings #12

Open
Flowdalic opened this issue Mar 2, 2022 · 1 comment
Open

Array out of bounds warnings #12

Flowdalic opened this issue Mar 2, 2022 · 1 comment

Comments

@Flowdalic
Copy link

Compiling fragview 0.1.2 on Gentoo triggers a few "array out of bounds" warnings:

 * QA Notice: Package triggers severe warnings which indicate that it
 *            may exhibit random runtime failures.
 * /var/tmp/portage/sys-fs/fragview-0.1.2/work/fragview-0.1.2/src/clusters.cc:447:42: warning: array subscript last_entry is outside array bounds of ‘fiemap_extent [0]’ [-Warray-bounds]
 * /var/tmp/portage/sys-fs/fragview-0.1.2/work/fragview-0.1.2/src/clusters.cc:447:86: warning: array subscript last_entry is outside array bounds of ‘fiemap_extent [0]’ [-Warray-bounds]
 * /var/tmp/portage/sys-fs/fragview-0.1.2/work/fragview-0.1.2/src/clusters.cc:432:46: warning: array subscript k is outside array bounds of ‘fiemap_extent [0]’ [-Warray-bounds]
 * /var/tmp/portage/sys-fs/fragview-0.1.2/work/fragview-0.1.2/src/clusters.cc:431:45: warning: array subscript k is outside array bounds of ‘fiemap_extent [0]’ [-Warray-bounds]
 
@i-rinat
Copy link
Owner

i-rinat commented Mar 19, 2022

This particular warning is imminent in the long run, as there are actual out of bounds accesses that are required to use the FIEMAP API. It's possible to hide them from compiler, which I did. There were also other warnings that were fixed as well.
I've pushed the updated version of the code and a new tag, v0.1.3.

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

No branches or pull requests

2 participants