Skip to content

Commit

Permalink
Fix all compiler warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Zammit <damien@zamaudio.com>
  • Loading branch information
zamaudio committed Feb 11, 2017
1 parent 2352012 commit c2a952f
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 25 deletions.
1 change: 0 additions & 1 deletion plugins/ZaMultiComp/ZaMultiCompPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,6 @@ float ZaMultiCompPlugin::averageabs(float samples[])

void ZaMultiCompPlugin::run(const float** inputs, float** outputs, uint32_t frames)
{
float srate = getSampleRate();
float maxx = max;

int tog1 = (toggle[0] > 0.5f) ? 1 : 0;
Expand Down
1 change: 0 additions & 1 deletion plugins/ZaMultiCompX2/ZaMultiCompX2Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ float ZaMultiCompX2Plugin::averageabs(float samples[])

void ZaMultiCompX2Plugin::run(const float** inputs, float** outputs, uint32_t frames)
{
float srate = getSampleRate();
float maxxL = 0.;
float maxxR = 0.;
uint32_t i;
Expand Down
6 changes: 0 additions & 6 deletions plugins/ZamComp/ZamCompPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,9 @@ void ZamCompPlugin::run(const float** inputs, float** outputs, uint32_t frames)
float release_coeff = exp(-1000.f/(release * srate));

int attslew = 0;
int relslew = 0;
float max = 0.f;
float lgaininp = 0.f;
float Lgain = 1.f;
float Rgain = 1.f;
float Lxg, Lxl, Lyg, Lyl, Ly1;
float checkwidth = 0.f;
bool usesidechain = (sidechain < 0.5) ? false : true;
Expand All @@ -314,7 +312,6 @@ void ZamCompPlugin::run(const float** inputs, float** outputs, uint32_t frames)
in0 = inputs[0][i];
in1 = inputs[1][i];
ingain = usesidechain ? in1 : in0;
relslew = 0;
attslew = 0;
Lyg = 0.f;
Lxg = (ingain==0.f) ? -160.f : to_dB(fabs(ingain));
Expand All @@ -331,8 +328,6 @@ void ZamCompPlugin::run(const float** inputs, float** outputs, uint32_t frames)
if (checkwidth <= slewwidth) {
if (Lyg >= oldL_yg) {
attslew = 1;
} else {
relslew = 1;
}
}
} else if (2.f*(Lxg-thresdb) > width) {
Expand All @@ -342,7 +337,6 @@ void ZamCompPlugin::run(const float** inputs, float** outputs, uint32_t frames)

attack_coeff = attslew ? exp(-1000.f/((attack + 2.0*(slewfactor - 1)) * srate)) : attack_coeff;
// Don't slew on release
//release_coeff = relslew ? exp(-1000.f/((release + 2.0*(slewfactor - 1)) * srate)) : release_coeff;

Lxl = Lxg - Lyg;

Expand Down
7 changes: 0 additions & 7 deletions plugins/ZamCompX2/ZamCompX2Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ void ZamCompX2Plugin::run(const float** inputs, float** outputs, uint32_t frames
bool usesidechain = (sidechain < 0.5) ? false : true;

int attslew = 0;
int relslew = 0;
float max = 0.f;
float lgaininp = 0.f;
float rgaininp = 0.f;
Expand All @@ -335,7 +334,6 @@ void ZamCompX2Plugin::run(const float** inputs, float** outputs, uint32_t frames
in0 = inputs[0][i];
in1 = inputs[1][i];
ingain = usesidechain ? inputs[2][i] : fmaxf(in0, in1);
relslew = 0;
attslew = 0;
Lyg = Ryg = 0.f;
if (usesidechain) {
Expand All @@ -360,8 +358,6 @@ void ZamCompX2Plugin::run(const float** inputs, float** outputs, uint32_t frames
if (checkwidth <= slewwidth) {
if (Lyg >= oldL_yg) {
attslew = 1;
} else {
relslew = 1;
}
}
} else if (2.f*(Lxg-thresdb) > width) {
Expand All @@ -378,8 +374,6 @@ void ZamCompX2Plugin::run(const float** inputs, float** outputs, uint32_t frames
if (checkwidth <= slewwidth) {
if (Ryg >= oldR_yg) {
attslew = 1;
} else {
relslew = 1;
}
}
} else if (2.f*(Rxg-thresdb) > width) {
Expand All @@ -389,7 +383,6 @@ void ZamCompX2Plugin::run(const float** inputs, float** outputs, uint32_t frames

attack_coeff = attslew ? exp(-1000.f/((attack + 2.0*(slewfactor - 1)) * srate)) : attack_coeff;
// Don't slew on release
//release_coeff = relslew ? exp(-1000.f/((release + 2.0*(slewfactor - 1)) * srate)) : release_coeff;

if (stereo == STEREOLINK_UNCOUPLED) {
Lxl = Lxg - Lyg;
Expand Down
1 change: 0 additions & 1 deletion plugins/ZamDynamicEQ/ZamDynamicEQPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@ void ZamDynamicEQPlugin::run(const float** inputs, float** outputs, uint32_t fra

int choose = (sidechain < 0.5) ? 0 : 1;
float gaincontrol = 0.f;
float gainq;

linear_svf_set_params(&bandpass, srate, detectfreq, 4.);

Expand Down
5 changes: 2 additions & 3 deletions plugins/ZamGate/ZamGatePlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void ZamGatePlugin::setParameterValue(uint32_t index, float value)
}
}

void ZamGatePlugin::loadProgram(uint32_t index)
void ZamGatePlugin::loadProgram(uint32_t)
{
attack = 50.0;
release = 100.0;
Expand Down Expand Up @@ -248,11 +248,10 @@ float ZamGatePlugin::averageabs(float samples[])
void ZamGatePlugin::run(const float** inputs, float** outputs, uint32_t frames)
{
uint32_t i;
float absamplel, absample;
float absample;
float att;
float rel;
float gl;
float ming;
float fs;
fs = getSampleRate();
gl = gatestatel;
Expand Down
2 changes: 1 addition & 1 deletion plugins/ZamGate/ZamGateUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void ZamGateUI::parameterChanged(uint32_t index, float value)
}
}

void ZamGateUI::programLoaded(uint32_t index)
void ZamGateUI::programLoaded(uint32_t)
{
// Default values
fKnobAttack->setValue(50.0f);
Expand Down
3 changes: 1 addition & 2 deletions plugins/ZamGateX2/ZamGateX2Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void ZamGateX2Plugin::setParameterValue(uint32_t index, float value)
}
}

void ZamGateX2Plugin::loadProgram(uint32_t index)
void ZamGateX2Plugin::loadProgram(uint32_t)
{
attack = 50.0;
release = 100.0;
Expand Down Expand Up @@ -263,7 +263,6 @@ void ZamGateX2Plugin::run(const float** inputs, float** outputs, uint32_t frames
float att;
float rel;
float g;
float ming;
float fs;
float in0;
float in1;
Expand Down
2 changes: 1 addition & 1 deletion plugins/ZamGateX2/ZamGateX2UI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void ZamGateX2UI::parameterChanged(uint32_t index, float value)
}
}

void ZamGateX2UI::programLoaded(uint32_t index)
void ZamGateX2UI::programLoaded(uint32_t)
{
// Default values
fKnobAttack->setValue(50.0f);
Expand Down
1 change: 0 additions & 1 deletion plugins/ZamTube/triode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ T Triode::fgdash(T VG) {

T Triode::ffp(T VP) {
static bool prepared = false;
static double scale;
static double coeff[4];
if(!prepared) {
//go go series expansion
Expand Down
2 changes: 1 addition & 1 deletion widgets/ZamWidgets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ class ZamKnob : public Widget,
ZamKnob::ZamKnob(Window& parent, const Image& image, Orientation orientation) noexcept
: Widget(parent),
NanoVG(CREATE_ANTIALIAS),
fLabel(false),
fImage(image),
fLabel(false),
fMinimum(0.0f),
fMaximum(1.0f),
fScrollStep(0.0f),
Expand Down

0 comments on commit c2a952f

Please sign in to comment.