JDimproved / JDim

2ch browser for linux
https://jdimproved.github.io/JDim/
GNU General Public License v2.0
46 stars 11 forks source link

Fix compiler warnings for -Wswitch-enum #1288

Closed ma8ma closed 11 months ago

ma8ma commented 11 months ago

switch文で明示的に処理されていない列挙型の値があるとコンパイラーに指摘されたため追加します。

clang-17のレポート (file pathを一部省略)

src/jdlib/jdsocket.cpp:252:13: warning: enumeration values 'none' and 'http' not explicitly handled in switch [-Wswitch-enum]
  252 |     switch( protocol ) {
      |             ^~~~~~~~
src/article/articleviewbase.cpp:2417:21: warning: enumeration value 'unknown' not explicitly handled in switch [-Wswitch-enum]
 2417 |             switch( enc )
      |                     ^~~