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

fix(3rd-party): fix mgen, ahp-xc and pentax errors on fedora. #965

Merged
merged 3 commits into from
Sep 1, 2024

Conversation

TallFurryMan
Copy link
Contributor

@TallFurryMan TallFurryMan commented Aug 31, 2024

fix(indi-mgen): work around C++14 out-of-bounds warnings.

This is a tentative PR to fix out-of-bounds warnings emitted by C++14 when building indi-mgen.

The implementation restricts the set of function candidates the compiler selects from when using an initialiser list on IOBuffer: IOBuffer{opcode,literal,literal...}, and makes sure to allocate space before copying the list data.

fix(indi-ahp-xc): silence warnings by allocating placeholders with their real size.

@iliaplatone I considered that placeholders with their real sizes instead of 1 byte everywhere wasn't that problematic. Feel free to comment.

fix(indi-pentax): fix calloc argument order.

calloc(sizeof,sizeof) expects the number of items as first argument, and the size of each as second.

@TallFurryMan
Copy link
Contributor Author

TallFurryMan commented Aug 31, 2024

Possibly the change in indi-mgen is not minimal. It builds without warnings in my local ghcr.io/indilib/fedora, so I suppose the idea may be used elsewhere in the codebase.

@TallFurryMan
Copy link
Contributor Author

TallFurryMan commented Aug 31, 2024

The fedora build fails because of other drivers, at least one for the same reason as this PR. I may have a look later this week-end.

@TallFurryMan TallFurryMan changed the title fix(indi-mgen): work around C++14 out-of-bounds warnings. fix(3rd-party): fix mgen, ahp-xc and pentax errors on fedora. Aug 31, 2024
@knro knro merged commit 4e9cc45 into indilib:master Sep 1, 2024
3 of 4 checks passed
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.

2 participants