diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-09 18:30:17 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-09 18:30:17 +0000 |
commit | 9f1903d96cccc7cb2f456d68d31446fa739905f7 (patch) | |
tree | 1c30a654f041dbb7614a2f8d64243b2e40336e0a | |
parent | 703f47458a859c9559c13038246dd37529eba6ff (diff) |
Fix compiler warnings, and a typo in the transport max slider value.
-rw-r--r-- | muse2/ChangeLog | 2 | ||||
-rw-r--r-- | muse2/muse/arranger/pcanvas.cpp | 8 | ||||
-rw-r--r-- | muse2/muse/arranger/pcanvas.h | 4 | ||||
-rw-r--r-- | muse2/muse/audioconvert.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/dssihost.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/osc.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/transport.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/wavetrack.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/widgets/CMakeLists.txt | 2 | ||||
-rw-r--r-- | muse2/plugins/pandelay/ladspapandelay.h | 3 | ||||
-rw-r--r-- | muse2/plugins/pandelay/pandelaymodel.h | 3 | ||||
-rw-r--r-- | muse2/synti/deicsonze/deicsonze.cpp | 2 | ||||
-rw-r--r-- | muse2/synti/fluidsynth/fluidsynti.cpp | 1 | ||||
-rw-r--r-- | muse2/synti/fluidsynth/fluidsynti.h | 2 | ||||
-rw-r--r-- | muse2/synti/simpledrums2/simpledrums.cpp | 2 | ||||
-rw-r--r-- | muse2/synti/simpledrums2/ssplugin.cpp | 6 |
16 files changed, 29 insertions, 20 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 7ac1723b..3e18642c 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -6,6 +6,8 @@ This also fixes the Transport position boxes' sections jumping to last section. TODO: There's still trouble editing with KB in Bar-Beat-Tick mode, the bar and beat being '1' based. TODO: Fix SigEdit (the time Signature Editor boxes). + - Fix some build and compiler warnings. (Orcan) + - Fix the max slider value in the transport. This was a typo I made during conversion. (Orcan) 08.12.2010: - Ported many more Qt3 methods to Qt4. (Orcan) - Turned off Qt3Support. Muse2 is now a pure Qt4 application. (Orcan) diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index b1eb22ca..d67eaf99 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -1862,7 +1862,7 @@ void PartCanvas::copy(PartList* pl) // pasteAt //--------------------------------------------------------- -int PartCanvas::pasteAt(const QString& pt, Track* track, int pos, bool clone, bool toTrack) +int PartCanvas::pasteAt(const QString& pt, Track* track, unsigned int pos, bool clone, bool toTrack) { //printf("int PartCanvas::pasteAt(const QString& pt, Track* track, int pos)\n"); QByteArray ba = pt.toLatin1(); @@ -1871,7 +1871,7 @@ int PartCanvas::pasteAt(const QString& pt, Track* track, int pos, bool clone, bo bool firstPart=true; int posOffset=0; //int finalPos=0; - int finalPos = pos; + unsigned int finalPos = pos; int notDone = 0; int done = 0; bool end = false; @@ -2438,7 +2438,7 @@ void PartCanvas::paste(bool clone, bool toTrack, bool doInsert) } int endPos=0; - int startPos=song->vcpos(); + unsigned int startPos=song->vcpos(); if (!txt.isEmpty()) { song->startUndo(); @@ -2459,7 +2459,7 @@ void PartCanvas::paste(bool clone, bool toTrack, bool doInsert) //--------------------------------------------------------- // movePartsToTheRight //--------------------------------------------------------- -void PartCanvas::movePartsTotheRight(int startTicks, int length) +void PartCanvas::movePartsTotheRight(unsigned int startTicks, int length) { // all parts that start after the pasted parts will be moved the entire length of the pasted parts for (iCItem i = items.begin(); i != items.end(); ++i) { diff --git a/muse2/muse/arranger/pcanvas.h b/muse2/muse/arranger/pcanvas.h index 8ce464a5..8b589d5c 100644 --- a/muse2/muse/arranger/pcanvas.h +++ b/muse2/muse/arranger/pcanvas.h @@ -95,8 +95,8 @@ class PartCanvas : public Canvas { void copy(PartList*); void paste(bool clone = false, bool toTrack = true, bool doInsert=false); - int pasteAt(const QString&, Track*, int, bool clone = false, bool toTrack = true); - void movePartsTotheRight(int startTick, int length); + int pasteAt(const QString&, Track*, unsigned int, bool clone = false, bool toTrack = true); + void movePartsTotheRight(unsigned int startTick, int length); //Part* readClone(Xml&, Track*, bool toTrack = true); void drawWavePart(QPainter&, const QRect&, WavePart*, const QRect&); Track* y2Track(int) const; diff --git a/muse2/muse/audioconvert.cpp b/muse2/muse/audioconvert.cpp index 7dd09eb9..552b5e95 100644 --- a/muse2/muse/audioconvert.cpp +++ b/muse2/muse/audioconvert.cpp @@ -22,7 +22,7 @@ // AudioConvertMap //--------------------------------------------------------- -void AudioConvertMap::remapEvents(const EventList* el) +void AudioConvertMap::remapEvents(const EventList* /*el*/) { } diff --git a/muse2/muse/dssihost.cpp b/muse2/muse/dssihost.cpp index dc7f0cf2..cb94f7ca 100644 --- a/muse2/muse/dssihost.cpp +++ b/muse2/muse/dssihost.cpp @@ -437,7 +437,7 @@ static void scanDSSIDir(QString& s) // ddskrjo removed const for argument //} QStringList list = pluginDir.entryList(); - for(unsigned int i = 0; i < list.count(); ++i) + for(int i = 0; i < list.count(); ++i) { if(debugMsg) printf("scanDSSIDir: found %s\n", (s + QString("/") + list[i]).toLatin1().constData()); @@ -2552,7 +2552,7 @@ int DssiSynthIF::oscControl(unsigned long port, float value) if(port >= synth->rpIdx.size()) { //fprintf(stderr, "DssiSynthIF::oscControl: port number:%d is out of range of number of ports:%d\n", port, controlPorts); - fprintf(stderr, "DssiSynthIF::oscControl: port number:%ld is out of range of index list size:%d\n", port, synth->rpIdx.size()); + fprintf(stderr, "DssiSynthIF::oscControl: port number:%ld is out of range of index list size:%zd\n", port, synth->rpIdx.size()); return 0; } diff --git a/muse2/muse/osc.cpp b/muse2/muse/osc.cpp index 0cfb0c23..ad4f038f 100644 --- a/muse2/muse/osc.cpp +++ b/muse2/muse/osc.cpp @@ -909,7 +909,7 @@ bool OscIF::oscInitGui(const QString& typ, const QString& baseName, const QStrin QStringList list = guiDir.entryList(); //for (int i = 0; i < list.size(); ++i) { - for (unsigned int i = 0; i < list.count(); ++i) + for (int i = 0; i < list.count(); ++i) { //QFileInfo fi = list.at(i); diff --git a/muse2/muse/transport.cpp b/muse2/muse/transport.cpp index 0e2a33e0..4dc59b93 100644 --- a/muse2/muse/transport.cpp +++ b/muse2/muse/transport.cpp @@ -370,7 +370,7 @@ Transport::Transport(QWidget* parent, const char* name) slider = new QSlider; slider->setMinimum(0); - slider->setMaximum(0); + slider->setMaximum(200000); slider->setPageStep(1000); slider->setValue(0); slider->setOrientation(Qt::Horizontal); @@ -567,7 +567,7 @@ void Transport::setPos(int idx, unsigned v, bool) case 0: time1->setValue(v); time2->setValue(v); - if(slider->value() != v) + if((unsigned) slider->value() != v) { slider->blockSignals(true); slider->setValue(v); diff --git a/muse2/muse/wavetrack.cpp b/muse2/muse/wavetrack.cpp index 9202f84e..fdebc8b8 100644 --- a/muse2/muse/wavetrack.cpp +++ b/muse2/muse/wavetrack.cpp @@ -104,7 +104,7 @@ void WaveTrack::fetchData(unsigned pos, unsigned samples, float** bp, bool doSee if(config.useDenormalBias) { // add denormal bias to outdata for (int i = 0; i < channels(); ++i) - for (int j = 0; j < samples; ++j) + for (unsigned int j = 0; j < samples; ++j) { bp[i][j] +=denormalBias; diff --git a/muse2/muse/widgets/CMakeLists.txt b/muse2/muse/widgets/CMakeLists.txt index 9394627c..93a15ef0 100644 --- a/muse2/muse/widgets/CMakeLists.txt +++ b/muse2/muse/widgets/CMakeLists.txt @@ -88,7 +88,7 @@ QT4_WRAP_CPP (widget_mocs noteinfo.h dentry.h siglabel.h - ttoolbar.h + # ttoolbar.h ttoolbutton.h tb1.h lcombo.h diff --git a/muse2/plugins/pandelay/ladspapandelay.h b/muse2/plugins/pandelay/ladspapandelay.h index ab5427a1..dd7fc0ea 100644 --- a/muse2/plugins/pandelay/ladspapandelay.h +++ b/muse2/plugins/pandelay/ladspapandelay.h @@ -33,6 +33,9 @@ #include "pandelaymodel.h" #include "../../muse/ladspa.h" +#ifdef NBRPARAM +#undef NBRPARAM +#endif #define NBRPARAM 6 class LADSPAPanDelay : public PanDelayModel { diff --git a/muse2/plugins/pandelay/pandelaymodel.h b/muse2/plugins/pandelay/pandelaymodel.h index 65983187..e3f74bcd 100644 --- a/muse2/plugins/pandelay/pandelaymodel.h +++ b/muse2/plugins/pandelay/pandelaymodel.h @@ -42,6 +42,9 @@ #define MINDELAYTIME 0.01 //in second #define MAXDELAYTIME 2.0 //in second +#ifdef NBRPARAM +#undef NBRPARAM +#endif #define NBRPARAM 5 class PanDelayModel { diff --git a/muse2/synti/deicsonze/deicsonze.cpp b/muse2/synti/deicsonze/deicsonze.cpp index 519a7f05..5ab39ee8 100644 --- a/muse2/synti/deicsonze/deicsonze.cpp +++ b/muse2/synti/deicsonze/deicsonze.cpp @@ -3609,7 +3609,7 @@ const char* DeicsOnze::getPatchName(int ch, int val, int) const { if (lbank == 127) // drum HACK lbank = 128; int prog = val & 0x7f; - char* tempName="INITVOICE"; + const char* tempName="INITVOICE"; p_preset=_set->findPreset(hbank, lbank, prog); if (p_preset) tempName=const_cast<char *>(p_preset->name.c_str()); return tempName; diff --git a/muse2/synti/fluidsynth/fluidsynti.cpp b/muse2/synti/fluidsynth/fluidsynti.cpp index 0802614b..ffd72561 100644 --- a/muse2/synti/fluidsynth/fluidsynti.cpp +++ b/muse2/synti/fluidsynth/fluidsynti.cpp @@ -56,6 +56,7 @@ FluidCtrl FluidSynth::fluidCtrl[] = { }; static int NUM_CONTROLLER = sizeof(FluidSynth::fluidCtrl)/sizeof(*(FluidSynth::fluidCtrl)); +static void* fontLoadThread(void* t); QString *projPathPtr; // diff --git a/muse2/synti/fluidsynth/fluidsynti.h b/muse2/synti/fluidsynth/fluidsynti.h index c187798d..a7e4ebfc 100644 --- a/muse2/synti/fluidsynth/fluidsynti.h +++ b/muse2/synti/fluidsynth/fluidsynti.h @@ -147,5 +147,5 @@ struct FS_Helper //Only used to pass parameters when calling the loading thread int id; }; -static void* fontLoadThread(void* t); +// static void* fontLoadThread(void* t); // moved to the implementation file -Orcan #endif /* __MUSE_FLUIDSYNTI_H__ */ diff --git a/muse2/synti/simpledrums2/simpledrums.cpp b/muse2/synti/simpledrums2/simpledrums.cpp index 13f1d3e2..82f1bd07 100644 --- a/muse2/synti/simpledrums2/simpledrums.cpp +++ b/muse2/synti/simpledrums2/simpledrums.cpp @@ -1329,7 +1329,7 @@ static void* loadSampleThread(void* p) //static Mess* instantiate(int sr, const char* name) -static Mess* instantiate(int sr, QWidget*, QString* projectPathPtr, const char* name) +static Mess* instantiate(int sr, QWidget*, QString* /*projectPathPtr*/, const char* name) { printf("SimpleSynth sampleRate %d\n", sr); SimpleSynth* synth = new SimpleSynth(sr); diff --git a/muse2/synti/simpledrums2/ssplugin.cpp b/muse2/synti/simpledrums2/ssplugin.cpp index 28639a39..2d8382e6 100644 --- a/muse2/synti/simpledrums2/ssplugin.cpp +++ b/muse2/synti/simpledrums2/ssplugin.cpp @@ -95,13 +95,13 @@ void SS_initPlugins() SS_TRACE_IN //loadPluginDir(museGlobalLib + QString("/plugins")); - char* ladspaPath = getenv("LADSPA_PATH"); + const char* ladspaPath = getenv("LADSPA_PATH"); if (ladspaPath == 0) ladspaPath = "/usr/lib/ladspa:/usr/local/lib/ladspa"; - char* p = ladspaPath; + const char* p = ladspaPath; while (*p != '\0') { - char* pe = p; + const char* pe = p; while (*pe != ':' && *pe != '\0') pe++; |