-
Notifications
You must be signed in to change notification settings - Fork 446
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
vcf.h: Remove const specifiers that are not honoured #274
base: develop
Are you sure you want to change the base?
Conversation
Surely it would be better just to fix the cast to:
It's just pointer arithmetic so it's not modifying the value. |
Then you need to change the type of parameter The problem is the functions |
This is the classic C-function-wants-to-work-on-either-const-or-non-const-strings problem as exemplified by It's made worse here by having the output string passed by reference as a parameter rather than returned. There are various solutions:
|
Thanks @jmarshall that all makes sense. Solution 2 seems like the best solution: it won't change the API and we don't have to adjust our compile options to satisfy htslib. |
Closing in favour of #275. |
Reopening, inlining is required so removing |
const
specifiers were being ignored in the header, resulting in many warnings in third party code compiling against htslib.