msvc: updated code for higher warning level
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@ endif()
|
||||
target_compile_definitions(${OLIVE_TARGET} PRIVATE ${OLIVE_DEFINITIONS})
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(${OLIVE_TARGET} PRIVATE /WX /W4 /experimental:external /external:anglebrackets /external:W0 "$<$<CONFIG:RELEASE>:/O2>")
|
||||
target_compile_options(${OLIVE_TARGET} PRIVATE /WX /W4 /wd4127 /wd4456 /wd4706 /experimental:external /external:anglebrackets /external:W0 "$<$<CONFIG:RELEASE>:/O2>")
|
||||
else()
|
||||
target_compile_options(${OLIVE_TARGET} PRIVATE -O2 -Werror -Wuninitialized -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion)
|
||||
endif()
|
||||
|
||||
@@ -358,14 +358,14 @@ FramePtr FFmpegDecoder::RetrieveAudio(const rational &timecode, const rational &
|
||||
WaveInput input(GetConformedFilename(params));
|
||||
|
||||
if (input.open()) {
|
||||
const AudioRenderingParams& params = input.params();
|
||||
const AudioRenderingParams& input_params = input.params();
|
||||
|
||||
FramePtr audio_frame = Frame::Create();
|
||||
audio_frame->set_audio_params(params);
|
||||
audio_frame->set_sample_count(params.time_to_samples(length));
|
||||
audio_frame->set_audio_params(input_params);
|
||||
audio_frame->set_sample_count(input_params.time_to_samples(length));
|
||||
audio_frame->allocate();
|
||||
|
||||
input.read(params.time_to_bytes(timecode),
|
||||
input.read(input_params.time_to_bytes(timecode),
|
||||
audio_frame->data(),
|
||||
audio_frame->allocated_size());
|
||||
|
||||
@@ -883,7 +883,7 @@ void FFmpegDecoder::IndexAudio(AVPacket *pkt, AVFrame *frame)
|
||||
data_frame->format = dst_sample_fmt;
|
||||
av_frame_make_writable(data_frame);
|
||||
|
||||
int ret = swr_convert_frame(resampler, data_frame, frame);
|
||||
ret = swr_convert_frame(resampler, data_frame, frame);
|
||||
|
||||
if (ret != 0) {
|
||||
char err_str[50];
|
||||
|
||||
@@ -37,8 +37,8 @@ ExportAudioTab::ExportAudioTab(QWidget* parent) :
|
||||
|
||||
channel_layout_combobox_ = new QComboBox();
|
||||
channel_layouts_ = Core::SupportedChannelLayouts();
|
||||
foreach (const uint64_t& layout, channel_layouts_) {
|
||||
channel_layout_combobox_->addItem(Core::ChannelLayoutToString(layout), QVariant::fromValue(layout));
|
||||
foreach (const uint64_t& ch_layout, channel_layouts_) {
|
||||
channel_layout_combobox_->addItem(Core::ChannelLayoutToString(ch_layout), QVariant::fromValue(layout));
|
||||
}
|
||||
layout->addWidget(channel_layout_combobox_, row, 1);
|
||||
|
||||
|
||||
@@ -115,8 +115,8 @@ SequenceDialog::SequenceDialog(Sequence* s, Type t, QWidget* parent) :
|
||||
|
||||
// Set up available channel layouts
|
||||
QList<uint64_t> channel_layouts = Core::SupportedChannelLayouts();
|
||||
foreach (const uint64_t& layout, channel_layouts) {
|
||||
audio_channels_field_->addItem(Core::ChannelLayoutToString(layout), QVariant::fromValue(layout));
|
||||
foreach (const uint64_t& ch_layout, channel_layouts) {
|
||||
audio_channels_field_->addItem(Core::ChannelLayoutToString(ch_layout), QVariant::fromValue(layout));
|
||||
}
|
||||
|
||||
// Set values based on input sequence
|
||||
|
||||
@@ -137,8 +137,8 @@ void DiskManager::CreatedFile(const QString &file_name, const QByteArray &hash)
|
||||
|
||||
lock_.unlock();
|
||||
|
||||
foreach (const QByteArray& hash, deleted_hashes) {
|
||||
emit DeletedFrame(hash);
|
||||
foreach (const QByteArray& h, deleted_hashes) {
|
||||
emit DeletedFrame(h);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user