switch missing default label warning under clang
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 45/100
Direção de pesquisa
Leia include/boost/function/function_base.hpp em torno do enum na linha 105 e do switch na linha 147 e reproduza o warning com clang 19.1.7 e as flags de warning reportadas. Verifique as orientações do projeto antes de escolher entre uma supressão e um caso default, e considere a issue concluída quando o erro -Wswitch-default reportado não ocorrer mais sem alterações não intencionais no comportamento.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
When compiling under clang 19.1.7 with werror and a number of other flags (we run with most warnings enabled), the line https://github.com/boostorg/function/blob/develop/include/boost/function/function_base.hpp#L147 is flagged with error: switch missing default label [-Werror,-Wswitch-default]. Given this is based on the enum at https://github.com/boostorg/function/blob/f6b538dbed2e3047dcbd09eb3f5c7f1ffa90d0a9/include/boost/function/function_base.hpp#L105 and all cases are handled a pr has not been provided at this time. I see two approaches, one is doing a compiler warning suppression and the other is adding the default label with a throw or similar as it should be an unreachable place based on the current code. The suppression seems like the simpler answer but may cause a future update to the enum to be missed here while the throw would prevent that at the cost of potentially changing behavior if something is flagged nothrow. Happy to submit a PR but would need guidance no how it should be approached here.
Env:
Alma 9.6
Boost 1.88.0 via cmake
clang 19.1.7
- Linguagem predominante
- C++
- Estrelas
- 26
- Forks
- 58
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Issues semelhantes
-
Component: Python API
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Vector35/binaryninja-api#8649 ·
Mantenedores costumam responder em até 3 dias
-
ai_p2 comp-parquet-reader-v3
Dificuldade 2/5 Meio dia Facilidade para iniciantes 66/100
ClickHouse/ClickHouse#124986 ·
Mantenedores costumam responder em até 1 dia
-
bug product: very_good_flutter_plugin
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 78/100
VeryGoodOpenSource/very_good_templates#654 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
AcademySoftwareFoundation/OpenImageIO#5550 ·
Mantenedores costumam responder em até 2 dias