Skip to content

Fix warning about discarding const in init_index2()#2550

Open
daviesrob wants to merge 1 commit intosamtools:developfrom
daviesrob:const-char
Open

Fix warning about discarding const in init_index2()#2550
daviesrob wants to merge 1 commit intosamtools: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>
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