Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-34914

qtmultimedia-opensource-src-5.2.0-beta1:qgstreamerrecordercontrol.cpp:100: 3 * missing break ?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.2.1
    • 5.2.0 Beta1
    • Multimedia
    • None
    • Linux
    • e26f5093c6d99c5b9632c3a0375c202bf4dbe627

    Description

      I just ran the static analyser cppcheck over the source code
      of qtmultimedia-opensource-src-5.2.0-beta1

      It said

      [qgstreamerrecordercontrol.cpp:100] -> [qgstreamerrecordercontrol.cpp:102]: (warning) Variable 'sessionState' is reassigned a value before the old one has been used. 'break;' missing?

      Source code is

      switch ( m_session->state() )

      { case QGstreamerCaptureSession::RecordingState: sessionState = QMediaRecorder::RecordingState; case QGstreamerCaptureSession::PausedState: sessionState = QMediaRecorder::PausedState; case QGstreamerCaptureSession::PreviewState: case QGstreamerCaptureSession::StoppedState: sessionState = QMediaRecorder::StoppedState; }

      Suggest add the three missing break statements.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ylopes Yoann Lopes
            dcb David Binderman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes