# HG changeset patch # User Chris Cannam # Date 1177942005 0 # Node ID e6d0b097d1022d03217379c8ed0a58220a6c037f # Parent 28c8e8e3c537695967e163c691f89a19e5bd336e * more compile warning fixes diff -r 28c8e8e3c537 -r e6d0b097d102 widgets/AudioDial.cpp --- a/widgets/AudioDial.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/AudioDial.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -137,7 +137,7 @@ int m_size = width() < height() ? width() : height(); int scale = 1; - int width = m_size - 2*scale, height = m_size - 2*scale; + int width = m_size - 2*scale; paint.begin(this); paint.setRenderHint(QPainter::Antialiasing, true); diff -r 28c8e8e3c537 -r e6d0b097d102 widgets/ListInputDialog.cpp --- a/widgets/ListInputDialog.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/ListInputDialog.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -77,7 +77,7 @@ QString ListInputDialog::getCurrentString() const { - for (int i = 0; i < m_radioButtons.size(); ++i) { + for (size_t i = 0; i < m_radioButtons.size(); ++i) { if (m_radioButtons[i]->isChecked()) { return m_strings[i]; } diff -r 28c8e8e3c537 -r e6d0b097d102 widgets/Panner.cpp --- a/widgets/Panner.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/Panner.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -127,7 +127,7 @@ } void -Panner::paintEvent(QPaintEvent *e) +Panner::paintEvent(QPaintEvent *) { QPainter paint(this); paint.setRenderHint(QPainter::Antialiasing, false); @@ -187,8 +187,8 @@ void Panner::setRectExtents(float x0, float y0, float width, float height) { - std::cerr << "Panner::setRectExtents(" << x0 << ", " << y0 << ", " - << width << ", " << height << ")" << std::endl; +// std::cerr << "Panner::setRectExtents(" << x0 << ", " << y0 << ", " +// << width << ", " << height << ")" << std::endl; if (m_rectX == x0 && m_rectY == y0 && diff -r 28c8e8e3c537 -r e6d0b097d102 widgets/PluginParameterBox.cpp --- a/widgets/PluginParameterBox.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/PluginParameterBox.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -69,7 +69,7 @@ QComboBox *programCombo = new QComboBox; programCombo->setMaxVisibleItems(20); - for (int i = 0; i < programs.size(); ++i) { + for (size_t i = 0; i < programs.size(); ++i) { programCombo->addItem(programs[i].c_str()); if (programs[i] == currentProgram) { programCombo->setCurrentIndex(i); @@ -133,7 +133,7 @@ combobox->setObjectName(identifier); for (unsigned int j = 0; j < valueNames.size(); ++j) { combobox->addItem(valueNames[j].c_str()); - if (lrintf((value - min) / qtz) == j) { + if ((unsigned int)(lrintf(fabsf((value - min) / qtz))) == j) { combobox->setCurrentIndex(j); } } @@ -301,7 +301,7 @@ value = min + step * qtz; } - int imin = 0, imax = 100; + int imax = 100; if (qtz > 0.0) { imax = int((max - min) / qtz); @@ -309,7 +309,7 @@ qtz = (max - min) / 100.0; } - int ival = (value - min) / qtz; + int ival = lrintf((value - min) / qtz); AudioDial *dial = m_params[identifier].dial; if (dial) { @@ -359,7 +359,7 @@ if (i->second.combo) { i->second.combo->blockSignals(true); - i->second.combo->setCurrentIndex(value); + i->second.combo->setCurrentIndex(lrintf(value)); i->second.combo->blockSignals(false); } } diff -r 28c8e8e3c537 -r e6d0b097d102 widgets/PluginParameterDialog.cpp --- a/widgets/PluginParameterDialog.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/PluginParameterDialog.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -193,8 +193,6 @@ m_advanced->setLayout(advancedLayout); grid->addWidget(m_advanced, 3, 0); - bool haveAdvanced = false; - m_channelBox = new QGroupBox; m_channelBox->setTitle(tr("Channels")); advancedLayout->addWidget(m_channelBox); @@ -373,7 +371,7 @@ blockSizeCombo->setEditable(true); bool found = false; for (int i = 0; i < 14; ++i) { - int val = pow(2, i + 3); + int val = 1 << (i + 3); blockSizeCombo->addItem(QString("%1").arg(val)); if (val == size) { blockSizeCombo->setCurrentIndex(i); @@ -395,7 +393,7 @@ incrementCombo->setEditable(true); found = false; for (int i = 0; i < 14; ++i) { - int val = pow(2, i + 3); + int val = 1 << (i + 3); incrementCombo->addItem(QString("%1").arg(val)); if (val == increment) { incrementCombo->setCurrentIndex(i); diff -r 28c8e8e3c537 -r e6d0b097d102 widgets/PropertyBox.cpp --- a/widgets/PropertyBox.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/PropertyBox.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -501,7 +501,7 @@ } void -PropertyBox::propertyContainerPropertyRangeChanged(PropertyContainer *pc) +PropertyBox::propertyContainerPropertyRangeChanged(PropertyContainer *) { blockSignals(true); diff -r 28c8e8e3c537 -r e6d0b097d102 widgets/PropertyStack.cpp --- a/widgets/PropertyStack.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/PropertyStack.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -199,7 +199,7 @@ } void -PropertyStack::propertyContainerNameChanged(PropertyContainer *pc) +PropertyStack::propertyContainerNameChanged(PropertyContainer *) { if (sender() != m_client) return; repopulate(); diff -r 28c8e8e3c537 -r e6d0b097d102 widgets/Thumbwheel.cpp --- a/widgets/Thumbwheel.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/Thumbwheel.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -483,7 +483,7 @@ int notches = 25; // radius of the wheel including invisible part - int radius = w / 2 + 2; + int radius = int(w / 2 + 2); for (int i = 0; i < notches; ++i) {