diff options
author | Lukas Rusak <lorusak@gmail.com> | 2021-12-18 10:21:44 -0800 |
---|---|---|
committer | Lukas Rusak <lorusak@gmail.com> | 2021-12-25 19:02:29 -0800 |
commit | 3bed159f2d2503f9d07f3c7cc4925cc8026660be (patch) | |
tree | cdffb2ab16c577fb9063cb18522dcdebf84df20a | |
parent | 4ac445c4a9f3080895bfcc34e7115e2de5b66d22 (diff) |
handle implicit-fallthrough warnings
-rw-r--r-- | xbmc-xrandr.c | 3 | ||||
-rw-r--r-- | xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 1 | ||||
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp | 9 | ||||
-rw-r--r-- | xbmc/cores/VideoPlayer/VideoRenderers/ColorManager.cpp | 1 | ||||
-rw-r--r-- | xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp | 2 | ||||
-rw-r--r-- | xbmc/dbwrappers/mysqldataset.cpp | 1 | ||||
-rw-r--r-- | xbmc/filesystem/ZipFile.cpp | 1 | ||||
-rw-r--r-- | xbmc/guilib/GUIBaseContainer.cpp | 4 | ||||
-rw-r--r-- | xbmc/guilib/GUIEditControl.cpp | 1 | ||||
-rw-r--r-- | xbmc/guilib/guiinfo/MusicGUIInfo.cpp | 1 | ||||
-rw-r--r-- | xbmc/network/cddb.cpp | 1 | ||||
-rw-r--r-- | xbmc/network/upnp/UPnPPlayer.cpp | 1 | ||||
-rw-r--r-- | xbmc/pvr/guilib/PVRGUIActionListener.cpp | 1 | ||||
-rw-r--r-- | xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp | 1 | ||||
-rw-r--r-- | xbmc/pvr/windows/GUIWindowPVRGuide.cpp | 1 | ||||
-rw-r--r-- | xbmc/utils/LabelFormatter.cpp | 2 |
16 files changed, 28 insertions, 3 deletions
diff --git a/xbmc-xrandr.c b/xbmc-xrandr.c index c4852ad6e8..6b916f083d 100644 --- a/xbmc-xrandr.c +++ b/xbmc-xrandr.c @@ -2479,12 +2479,15 @@ int main(int argc, char** argv) case 2: pan->left = pan->top = 0; /* fall through */ + __attribute__((fallthrough)); case 4: pan->track_left = pan->track_top = pan->track_width = pan->track_height = 0; /* fall through */ + __attribute__((fallthrough)); case 8: pan->border_left = pan->border_top = pan->border_right = pan->border_bottom = 0; /* fall through */ + __attribute__((fallthrough)); case 12: break; default: diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp index f891c4b5f8..d341d90c30 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp @@ -860,6 +860,7 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg) return; CLog::Log(LOGDEBUG,"CActiveAE - display reset event"); displayReset = true; + [[fallthrough]]; case CActiveAEControlProtocol::INIT: m_extError = false; m_extSuspended = false; diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp index 57d0e78f20..5f58bc5736 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp @@ -2311,6 +2311,7 @@ void CMixer::SetHWUpscaling() vdp_st = m_config.context->GetProcs().vdp_video_mixer_set_feature_enables(m_videoMixer, ARSIZE(feature), feature, enabled); break; } + [[fallthrough]]; case 8: if (m_config.vdpau->Supports(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L8)) { @@ -2318,6 +2319,7 @@ void CMixer::SetHWUpscaling() vdp_st = m_config.context->GetProcs().vdp_video_mixer_set_feature_enables(m_videoMixer, ARSIZE(feature), feature, enabled); break; } + [[fallthrough]]; case 7: if (m_config.vdpau->Supports(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L7)) { @@ -2325,6 +2327,7 @@ void CMixer::SetHWUpscaling() vdp_st = m_config.context->GetProcs().vdp_video_mixer_set_feature_enables(m_videoMixer, ARSIZE(feature), feature, enabled); break; } + [[fallthrough]]; case 6: if (m_config.vdpau->Supports(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L6)) { @@ -2332,6 +2335,7 @@ void CMixer::SetHWUpscaling() vdp_st = m_config.context->GetProcs().vdp_video_mixer_set_feature_enables(m_videoMixer, ARSIZE(feature), feature, enabled); break; } + [[fallthrough]]; case 5: if (m_config.vdpau->Supports(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L5)) { @@ -2339,6 +2343,7 @@ void CMixer::SetHWUpscaling() vdp_st = m_config.context->GetProcs().vdp_video_mixer_set_feature_enables(m_videoMixer, ARSIZE(feature), feature, enabled); break; } + [[fallthrough]]; case 4: if (m_config.vdpau->Supports(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L4)) { @@ -2346,6 +2351,7 @@ void CMixer::SetHWUpscaling() vdp_st = m_config.context->GetProcs().vdp_video_mixer_set_feature_enables(m_videoMixer, ARSIZE(feature), feature, enabled); break; } + [[fallthrough]]; case 3: if (m_config.vdpau->Supports(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L3)) { @@ -2353,6 +2359,7 @@ void CMixer::SetHWUpscaling() vdp_st = m_config.context->GetProcs().vdp_video_mixer_set_feature_enables(m_videoMixer, ARSIZE(feature), feature, enabled); break; } + [[fallthrough]]; case 2: if (m_config.vdpau->Supports(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L2)) { @@ -2360,6 +2367,7 @@ void CMixer::SetHWUpscaling() vdp_st = m_config.context->GetProcs().vdp_video_mixer_set_feature_enables(m_videoMixer, ARSIZE(feature), feature, enabled); break; } + [[fallthrough]]; case 1: if (m_config.vdpau->Supports(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1)) { @@ -2367,6 +2375,7 @@ void CMixer::SetHWUpscaling() vdp_st = m_config.context->GetProcs().vdp_video_mixer_set_feature_enables(m_videoMixer, ARSIZE(feature), feature, enabled); break; } + [[fallthrough]]; default: DisableHQScaling(); return; diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/ColorManager.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/ColorManager.cpp index ca3f5d7264..2addf4ae68 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/ColorManager.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/ColorManager.cpp @@ -487,6 +487,7 @@ cmsToneCurve* CColorManager::CreateToneCurve(CMS_TRC_TYPE gammaType, #undef HALFPT } // fall through to bt.1886 with calculated technical gamma + [[fallthrough]]; case CMS_TRC_BT1886: { diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp index 117b80be7e..207418771f 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp @@ -807,6 +807,8 @@ void CLinuxRendererGL::UpdateVideoFilter() return; } } + + [[fallthrough]]; } case VS_SCALINGMETHOD_LANCZOS2: diff --git a/xbmc/dbwrappers/mysqldataset.cpp b/xbmc/dbwrappers/mysqldataset.cpp index e7da21347c..9c7d13ad5c 100644 --- a/xbmc/dbwrappers/mysqldataset.cpp +++ b/xbmc/dbwrappers/mysqldataset.cpp @@ -996,6 +996,7 @@ void MysqlDatabase::mysqlVXPrintf( flag_longlong = sizeof(char*)==sizeof(int64_t); flag_long = sizeof(char*)==sizeof(long int); /* Fall through into the next case */ + [[fallthrough]]; case etRADIX: if( infop->flags & FLAG_SIGNED ){ int64_t v; diff --git a/xbmc/filesystem/ZipFile.cpp b/xbmc/filesystem/ZipFile.cpp index 0a88faaf0c..bb2e1be3c5 100644 --- a/xbmc/filesystem/ZipFile.cpp +++ b/xbmc/filesystem/ZipFile.cpp @@ -509,6 +509,7 @@ bool CZipFile::DecompressGzip(const std::string& in, std::string& out) { case Z_NEED_DICT: err = Z_DATA_ERROR; + [[fallthrough]]; case Z_DATA_ERROR: case Z_MEM_ERROR: case Z_STREAM_ERROR: diff --git a/xbmc/guilib/GUIBaseContainer.cpp b/xbmc/guilib/GUIBaseContainer.cpp index 3e0666727b..a38c32c6e7 100644 --- a/xbmc/guilib/GUIBaseContainer.cpp +++ b/xbmc/guilib/GUIBaseContainer.cpp @@ -373,8 +373,8 @@ bool CGUIBaseContainer::OnAction(const CAction &action) return true; else if (action.GetID()) return OnClick(action.GetID()); - else - return false; + + return false; case ACTION_FIRST_PAGE: SelectItem(0); diff --git a/xbmc/guilib/GUIEditControl.cpp b/xbmc/guilib/GUIEditControl.cpp index c7e392473f..726559352d 100644 --- a/xbmc/guilib/GUIEditControl.cpp +++ b/xbmc/guilib/GUIEditControl.cpp @@ -337,6 +337,7 @@ void CGUIEditControl::OnClick() case INPUT_TYPE_PASSWORD_MD5: utf8 = ""; //! @todo Ideally we'd send this to the keyboard and tell the keyboard we have this type of input // fallthrough + [[fallthrough]]; case INPUT_TYPE_TEXT: default: textChanged = CGUIKeyboardFactory::ShowAndGetInput(utf8, m_inputHeading, true, m_inputType == INPUT_TYPE_PASSWORD || m_inputType == INPUT_TYPE_PASSWORD_MD5); diff --git a/xbmc/guilib/guiinfo/MusicGUIInfo.cpp b/xbmc/guilib/guiinfo/MusicGUIInfo.cpp index 0c35643b14..4d78ca5e83 100644 --- a/xbmc/guilib/guiinfo/MusicGUIInfo.cpp +++ b/xbmc/guilib/guiinfo/MusicGUIInfo.cpp @@ -247,6 +247,7 @@ bool CMusicGUIInfo::GetLabel(std::string& value, const CFileItem *item, int cont if (!g_application.GetAppPlayer().IsPlayingAudio()) break; // fall-thru is intended. + [[fallthrough]]; case MUSICPLAYER_DURATION: case LISTITEM_DURATION: { diff --git a/xbmc/network/cddb.cpp b/xbmc/network/cddb.cpp index f8e4806081..acbfc9f136 100644 --- a/xbmc/network/cddb.cpp +++ b/xbmc/network/cddb.cpp @@ -984,6 +984,7 @@ bool Xcddb::queryCDinfo(CCdInfo* pInfo) LOGINFO, "Xcddb::queryCDinfo No match found in CDDB database when doing the query shown below:\n{}", query_buffer); + [[fallthrough]]; case 403: //Database entry is corrupt case 409: //No handshake default: diff --git a/xbmc/network/upnp/UPnPPlayer.cpp b/xbmc/network/upnp/UPnPPlayer.cpp index 3011c227ed..2f38a667d1 100644 --- a/xbmc/network/upnp/UPnPPlayer.cpp +++ b/xbmc/network/upnp/UPnPPlayer.cpp @@ -602,6 +602,7 @@ bool CUPnPPlayer::OnAction(const CAction &action) return false; /* let normal code handle the action */ } + [[fallthrough]]; default: return false; } diff --git a/xbmc/pvr/guilib/PVRGUIActionListener.cpp b/xbmc/pvr/guilib/PVRGUIActionListener.cpp index 86b7f1aa98..d6112c2515 100644 --- a/xbmc/pvr/guilib/PVRGUIActionListener.cpp +++ b/xbmc/pvr/guilib/PVRGUIActionListener.cpp @@ -134,6 +134,7 @@ bool CPVRGUIActionListener::OnAction(const CAction& action) case ACTION_JUMP_SMS9: bIsJumpSMS = true; // fallthru is intended + [[fallthrough]]; case REMOTE_0: case REMOTE_1: case REMOTE_2: diff --git a/xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp b/xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp index 4390d7b116..2a0f865c16 100644 --- a/xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp +++ b/xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp @@ -748,6 +748,7 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem* item, const CGUIInf return true; } // fall-thru is intended + [[fallthrough]]; } case VIDEOPLAYER_CHANNEL_NAME: case LISTITEM_CHANNEL_NAME: diff --git a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp index 96df3c1618..742915b041 100644 --- a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp +++ b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp @@ -346,6 +346,7 @@ bool CGUIWindowPVRGuideBase::OnAction(const CAction& action) break; } // fall-thru is intended + [[fallthrough]]; case REMOTE_1: case REMOTE_2: case REMOTE_3: diff --git a/xbmc/utils/LabelFormatter.cpp b/xbmc/utils/LabelFormatter.cpp index 08e8221982..384299f5f8 100644 --- a/xbmc/utils/LabelFormatter.cpp +++ b/xbmc/utils/LabelFormatter.cpp @@ -329,8 +329,8 @@ std::string CLabelFormatter::GetMaskContent(const CMaskString &mask, const CFile value = music->GetOriginalDate(); if (!CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_bMusicLibraryUseISODates) value = StringUtils::ISODateToLocalizedDate(value); - break; } + break; case 'd': // date and time if (item->m_dateTime.IsValid()) value = item->m_dateTime.GetAsLocalizedDateTime(); |