Skip to content

Conversation

@jmarshall
Copy link
Member

Refactor this code to avoid a -Wformat-nonliteral warning. Since PR #1406 was applied, this is the only instance of this warning produced by the HTSlib code base.

With this false positive corrected, it would be possible to turn -Wformat=2 -Werror on in a CI build.
(For GCC builds only; Clang's equivalent option has false positives as it does not suppress the warning for va_list-using functions.)

Refactor this code to avoid a -Wformat-nonliteral warning.
@daviesrob
Copy link
Member

Looks like a good idea, as it will allow us to eliminate an entire class of bug. The only side-effect is it changes the order of items in the feature string - hopefully no-one relies on that.

I'll merge this and look at adding a -Wformat=2 to the test harness in a separate PR.

@daviesrob daviesrob merged commit 0d83a7b into samtools:develop Feb 23, 2022
@jmarshall jmarshall deleted the hts_feature_string branch February 23, 2022 12:25
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