commit 8b99b9ceabe463eba5d6eb78d4758d18d098c859
parent 8135306cb8f1e768c0a3ebbbcb5faf2f36fdd122
Author: fundamental <[email protected]>
Date: Thu, 7 Sep 2017 14:46:06 -0400
Fix Compiler Warnings
Diffstat:
9 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/src/Misc/Bank.cpp b/src/Misc/Bank.cpp
@@ -492,7 +492,7 @@ std::vector<std::string> Bank::search(std::string s) const
std::vector<std::string> Bank::blist(std::string s)
{
std::vector<std::string> out;
- int result = loadbank(s);
+ loadbank(s);
for(int i=0; i<128; ++i) {
if(ins[i].filename.empty())
out.push_back("Empty Preset");
diff --git a/src/Misc/BankDb.cpp b/src/Misc/BankDb.cpp
@@ -80,17 +80,17 @@ static svec split(string s)
return vec;
}
-static string line(string s)
-{
- string ss;
- for(char c:s) {
- if(c != '\n')
- ss.push_back(c);
- else
- return ss;
- }
- return ss;
-}
+//static string line(string s)
+//{
+// string ss;
+// for(char c:s) {
+// if(c != '\n')
+// ss.push_back(c);
+// else
+// return ss;
+// }
+// return ss;
+//}
bvec BankDb::search(std::string ss) const
{
diff --git a/src/Misc/Master.cpp b/src/Misc/Master.cpp
@@ -186,6 +186,7 @@ static const Ports auto_param_ports = {
rEnd},
{"mapping/", 0, &mapping_ports,
rBegin;
+ (void) a;
SNIP;
mapping_ports.dispatch(msg, d);
rEnd},
@@ -664,7 +665,6 @@ void Master::loadAutomation(XMLwrapper &xml, rtosc::AutomationMgr &midi)
auto &slot = midi.slots[i];
if(xml.enterbranch("slot", i)) {
for(int j=0; j<midi.per_slot; ++j) {
- auto &au = slot.automations[j];
if(xml.enterbranch("automation", j)) {
float gain = 1.0;
float offset = 0.0;
diff --git a/src/Misc/Microtonal.cpp b/src/Misc/Microtonal.cpp
@@ -870,6 +870,7 @@ void Microtonal::apply(void)
strncat(buf, tmpbuf, sizeof(buf)-1);
}
int err = texttotunings(buf);
+ (void) err;
}
}
diff --git a/src/Misc/Schema.cpp b/src/Misc/Schema.cpp
@@ -68,6 +68,7 @@ static const char *escape_string(const char *msg)
using std::ostream;
using std::string;
+#if 0
static int enum_min(Port::MetaContainer meta)
{
int min = 0;
@@ -125,6 +126,7 @@ static ostream &add_options(ostream &o, Port::MetaContainer meta)
return o;
}
+#endif
/*
* parameter :
diff --git a/src/Misc/XMLwrapper.cpp b/src/Misc/XMLwrapper.cpp
@@ -253,7 +253,7 @@ void XMLwrapper::addparreal(const string &name, float val)
union { float in; uint32_t out; } convert;
char buf[11];
convert.in = val;
- sprintf(buf, "0x%0.8X", convert.out);
+ sprintf(buf, "0x%.8X", convert.out);
addparams("par_real", 3, "name", name.c_str(), "value",
stringFrom<float>(val).c_str(), "exact_value", buf);
}
diff --git a/src/Params/FilterParams.cpp b/src/Params/FilterParams.cpp
@@ -172,7 +172,6 @@ const rtosc::Ports FilterParams::ports = {
0.0, cf.d[1]);
}
} else if(obj->Pcategory == 2) {
- int order = 0;
float gain = dB2rap(obj->getgain());
auto cf = SVFilter::computeResponse(obj->Ptype,
Filter::getrealfreq(obj->getfreq()),
diff --git a/src/Plugin/ZynAddSubFX/ZynAddSubFX.cpp b/src/Plugin/ZynAddSubFX/ZynAddSubFX.cpp
@@ -224,7 +224,7 @@ protected:
parameter.ranges.def = 0.0f;
break;
}
- if(kParamSlot1 <= index && index <= kParamSlot16) {
+ if(index <= kParamSlot16) {
parameter.hints = kParameterIsAutomable;
parameter.name = ("Slot " + zyn::to_s(index-kParamSlot1 + 1)).c_str();
parameter.symbol = ("slot" + zyn::to_s(index-kParamSlot1 + 1)).c_str();
@@ -246,7 +246,7 @@ protected:
case kParamOscPort:
return oscPort;
}
- if(kParamSlot1 <= index && index <= kParamSlot16) {
+ if(index <= kParamSlot16) {
return master->automate.getSlot(index - kParamSlot1);
}
return 0.0f;
@@ -260,10 +260,8 @@ protected:
*/
void setParameterValue(uint32_t index, float value) noexcept override
{
- // only an output port for now
- if(kParamSlot1 <= index && index <= kParamSlot16) {
+ if(index <= kParamSlot16)
master->automate.setSlot(index - kParamSlot1, value);
- }
}
/* --------------------------------------------------------------------------------------------------------
diff --git a/src/Tests/MessageTest.h b/src/Tests/MessageTest.h
@@ -280,7 +280,7 @@ class MessageTest:public CxxTest::TestSuite
void testFilterDepricated(void)
{
vector<string> v = {"Pfreq", "Pfreqtrack", "Pgain", "Pq"};
- for(int i=0; i<v.size(); ++i) {
+ for(int i=0; i<(int)v.size(); ++i) {
string path = "/part0/kit0/adpars/GlobalPar/GlobalFilter/"+v[i];
for(int j=0; j<128; ++j) {
mw->transmitMsg(path.c_str(), "i", j); //Set
@@ -318,6 +318,7 @@ class MessageTest:public CxxTest::TestSuite
state = 0;
}
+ (void) id;
//printf("Message #%d %s:%s\n", id++, msg, rtosc_argument_string(msg));
//if(rtosc_narguments(msg))
// printf(" %d\n", rtosc_argument(msg, 0).i);