Skip to content

Fix warning about discarding const in init_index2()#2550

Merged
daviesrob merged 1 commit into
samtools:developfrom
daviesrob:const-char
May 14, 2026
Merged

Fix warning about discarding const in init_index2()#2550
daviesrob merged 1 commit into
samtools:developfrom
daviesrob:const-char

Conversation

@daviesrob
Copy link
Copy Markdown
Member

The warning is a bit odd, as the variable in question is initialised from strstr() which is supposed to return char * (even though the input is const char *). However, as there are no writes to the new pointer, there's no problem with changing it to a const char *.

The warning is a bit odd, as the variable in question is
initialised from strstr() which is supposed to return `char *`
(even though the input is `const char *`).  However, as there
are no writes to the new pointer, there's no problem with
changing it to a `const char *`.

Signed-off-by: Rob Davies <rmd+git@sanger.ac.uk>
@daviesrob daviesrob merged commit 0b2fa4e into samtools:develop May 14, 2026
14 checks passed
@daviesrob daviesrob deleted the const-char branch May 14, 2026 10:39
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.

1 participant