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

libstatgrab: correctly detect new signature for sg_disk_io_stats() #807

Closed

Conversation

vincentbernat
Copy link
Contributor

Enable -Werror to turn the warning into an error. I would have loved
using -Werror=incompatible-pointer-types but it is only supported with
very recent versions of gcc. Otherwise, it would just throw an error.

Also see #806 for an alternate solution. I think that #806 is better because relying on -Werror to only trigger an error on signature mismatch seems fragile. We could get other kind of warnings, like "comparison always true" when compilers will get smarter.

Enable `-Werror` to turn the warning into an error. I would have loved
using `-Werror=incompatible-pointer-types` but it is only supported with
very recent versions of gcc. Otherwise, it would just throw an error.
vincentbernat referenced this pull request in vincentbernat/collectd Nov 17, 2014
… 0.9

In those versions, `sg_get_disk_io_stats()` need to be invoked a pointer
to size_t instead of pointer to int. Such a requirement is detected at
configure-time.

Fixes: collectd#445
@pyr
Copy link
Member

pyr commented Nov 17, 2014

This is a bit brittle, there's a good chance configure.ac might generate code with warnings.
Closing as discussed with @vincentbernat .

:person_frowning:

@pyr pyr closed this Nov 17, 2014
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.

None yet

2 participants