From 8bdcc670fe562798bfb408eb5cdbc07ba66af855 Mon Sep 17 00:00:00 2001 From: "v.audacity" Date: Mon, 16 Jul 2012 23:32:54 +0000 Subject: [PATCH] Fix a couple of compiler warnings. --- src/FFmpeg.cpp | 2 +- src/Menus.cpp | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/FFmpeg.cpp b/src/FFmpeg.cpp index acbb5908f..8c4d8c1b0 100644 --- a/src/FFmpeg.cpp +++ b/src/FFmpeg.cpp @@ -433,7 +433,7 @@ streamContext *import_ffmpeg_read_next_frame(AVFormatContext* formatContext, } // Find a stream to which this frame belongs to - for (int i = 0; i < numStreams; i++) + for (unsigned int i = 0; i < numStreams; i++) { if (streams[i]->m_stream->index == pkt.stream_index) sc = streams[i]; diff --git a/src/Menus.cpp b/src/Menus.cpp index cd92f9bf0..ec0c55e4b 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -3579,18 +3579,13 @@ void AudacityProject::OnCut() while (n) { if (n->GetSelected()) { dest = NULL; - switch (n->GetKind()) - { #if defined(USE_MIDI) - case Track::Note: - // Since portsmf has a built-in cut operator, we use that instead - n->Cut(mViewInfo.sel0, mViewInfo.sel1, &dest); - break; + if (n->GetKind() == Track::Note) + // Since portsmf has a built-in cut operator, we use that instead + n->Cut(mViewInfo.sel0, mViewInfo.sel1, &dest); + else #endif - default: - n->Copy(mViewInfo.sel0, mViewInfo.sel1, &dest); - break; - } + n->Copy(mViewInfo.sel0, mViewInfo.sel1, &dest); if (dest) { dest->SetChannel(n->GetChannel());