added pragmas to calm gcc in bw_{env_gen,hs2,ls2,one_pole,peak}
This commit is contained in:
parent
d2994b0e12
commit
637cefb636
@ -53,6 +53,8 @@
|
|||||||
* <li>Added overladed C++ <code>process()</code> function taking
|
* <li>Added overladed C++ <code>process()</code> function taking
|
||||||
* C-style arrays as arguments.</li>
|
* C-style arrays as arguments.</li>
|
||||||
* <li>Removed usage of reserved identifiers.</li>
|
* <li>Removed usage of reserved identifiers.</li>
|
||||||
|
* <li>Added pragmas to silence bogus GCC uninitialized variable
|
||||||
|
* warnings.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </li>
|
* </li>
|
||||||
* <li>Version <strong>0.6.0</strong>:
|
* <li>Version <strong>0.6.0</strong>:
|
||||||
@ -422,28 +424,40 @@ static inline void bw_env_gen_process_multi(bw_env_gen_coeffs *BW_RESTRICT coeff
|
|||||||
static inline void bw_env_gen_set_attack(bw_env_gen_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_env_gen_set_attack(bw_env_gen_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->attack != value) {
|
if (coeffs->attack != value) {
|
||||||
coeffs->attack = value;
|
coeffs->attack = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_ENV_GEN_PARAM_ATTACK;
|
coeffs->param_changed |= BW_ENV_GEN_PARAM_ATTACK;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void bw_env_gen_set_decay(bw_env_gen_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_env_gen_set_decay(bw_env_gen_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->decay != value) {
|
if (coeffs->decay != value) {
|
||||||
coeffs->decay = value;
|
coeffs->decay = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_ENV_GEN_PARAM_DECAY;
|
coeffs->param_changed |= BW_ENV_GEN_PARAM_DECAY;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void bw_env_gen_set_sustain(bw_env_gen_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_env_gen_set_sustain(bw_env_gen_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->sustain != value) {
|
if (coeffs->sustain != value) {
|
||||||
coeffs->sustain = value;
|
coeffs->sustain = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_ENV_GEN_PARAM_SUSTAIN;
|
coeffs->param_changed |= BW_ENV_GEN_PARAM_SUSTAIN;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void bw_env_gen_set_release(bw_env_gen_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_env_gen_set_release(bw_env_gen_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->release != value) {
|
if (coeffs->release != value) {
|
||||||
coeffs->release = value;
|
coeffs->release = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_ENV_GEN_PARAM_RELEASE;
|
coeffs->param_changed |= BW_ENV_GEN_PARAM_RELEASE;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@
|
|||||||
* <li>Added overladed C++ <code>process()</code> function taking
|
* <li>Added overladed C++ <code>process()</code> function taking
|
||||||
* C-style arrays as arguments.</li>
|
* C-style arrays as arguments.</li>
|
||||||
* <li>Removed usage of reserved identifiers.</li>
|
* <li>Removed usage of reserved identifiers.</li>
|
||||||
|
* <li>Added pragmas to silence bogus GCC uninitialized variable
|
||||||
|
* warnings.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </li>
|
* </li>
|
||||||
* <li>Version <strong>0.6.0</strong>:
|
* <li>Version <strong>0.6.0</strong>:
|
||||||
@ -293,7 +295,10 @@ static inline void bw_hs2_process_multi(bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs
|
|||||||
static inline void bw_hs2_set_cutoff(bw_hs2_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_hs2_set_cutoff(bw_hs2_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->cutoff) {
|
if (coeffs->cutoff) {
|
||||||
coeffs->cutoff = value;
|
coeffs->cutoff = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_HS2_PARAM_CUTOFF;
|
coeffs->param_changed |= BW_HS2_PARAM_CUTOFF;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,7 +309,10 @@ static inline void bw_hs2_set_Q(bw_hs2_coeffs *BW_RESTRICT coeffs, float value)
|
|||||||
static inline void bw_hs2_set_high_gain_lin(bw_hs2_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_hs2_set_high_gain_lin(bw_hs2_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->high_gain != value) {
|
if (coeffs->high_gain != value) {
|
||||||
coeffs->high_gain = value;
|
coeffs->high_gain = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_HS2_PARAM_HIGH_GAIN;
|
coeffs->param_changed |= BW_HS2_PARAM_HIGH_GAIN;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,8 @@
|
|||||||
* <li>Added overladed C++ <code>process()</code> function taking
|
* <li>Added overladed C++ <code>process()</code> function taking
|
||||||
* C-style arrays as arguments.</li>
|
* C-style arrays as arguments.</li>
|
||||||
* <li>Removed usage of reserved identifiers.</li>
|
* <li>Removed usage of reserved identifiers.</li>
|
||||||
|
* <li>Added pragmas to silence bogus GCC uninitialized variable
|
||||||
|
* warnings.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </li>
|
* </li>
|
||||||
* <li>Version <strong>0.6.0</strong>:
|
* <li>Version <strong>0.6.0</strong>:
|
||||||
@ -292,7 +294,10 @@ static inline void bw_ls2_process_multi(bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls
|
|||||||
static inline void bw_ls2_set_cutoff(bw_ls2_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_ls2_set_cutoff(bw_ls2_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->cutoff != value) {
|
if (coeffs->cutoff != value) {
|
||||||
coeffs->cutoff = value;
|
coeffs->cutoff = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_LS2_PARAM_CUTOFF;
|
coeffs->param_changed |= BW_LS2_PARAM_CUTOFF;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,7 +308,10 @@ static inline void bw_ls2_set_Q(bw_ls2_coeffs *BW_RESTRICT coeffs, float value)
|
|||||||
static inline void bw_ls2_set_dc_gain_lin(bw_ls2_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_ls2_set_dc_gain_lin(bw_ls2_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->dc_gain != value) {
|
if (coeffs->dc_gain != value) {
|
||||||
coeffs->dc_gain = value;
|
coeffs->dc_gain = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_LS2_PARAM_DC_GAIN;
|
coeffs->param_changed |= BW_LS2_PARAM_DC_GAIN;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
* <li>Now using backward Euler rather than impulse invariant
|
* <li>Now using backward Euler rather than impulse invariant
|
||||||
* method.</li>
|
* method.</li>
|
||||||
* <li>Added more debugging code.</li>
|
* <li>Added more debugging code.</li>
|
||||||
|
* <li>Added pragmas to silence bogus GCC uninitialized variable
|
||||||
|
* warnings.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </li>
|
* </li>
|
||||||
* <li>Version <strong>0.6.0</strong>:
|
* <li>Version <strong>0.6.0</strong>:
|
||||||
@ -966,7 +968,10 @@ static inline void bw_one_pole_set_cutoff_up(
|
|||||||
|
|
||||||
if (coeffs->cutoff_up != value) {
|
if (coeffs->cutoff_up != value) {
|
||||||
coeffs->cutoff_up = value;
|
coeffs->cutoff_up = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_ONE_POLE_PARAM_CUTOFF_UP;
|
coeffs->param_changed |= BW_ONE_POLE_PARAM_CUTOFF_UP;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
|
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
|
||||||
@ -984,7 +989,10 @@ static inline void bw_one_pole_set_cutoff_down(
|
|||||||
|
|
||||||
if (coeffs->cutoff_down != value) {
|
if (coeffs->cutoff_down != value) {
|
||||||
coeffs->cutoff_down = value;
|
coeffs->cutoff_down = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_ONE_POLE_PARAM_CUTOFF_DOWN;
|
coeffs->param_changed |= BW_ONE_POLE_PARAM_CUTOFF_DOWN;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
|
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
|
||||||
@ -1050,7 +1058,10 @@ static inline void bw_one_pole_set_sticky_thresh(
|
|||||||
|
|
||||||
if (coeffs->sticky_thresh != value) {
|
if (coeffs->sticky_thresh != value) {
|
||||||
coeffs->sticky_thresh = value;
|
coeffs->sticky_thresh = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_ONE_POLE_PARAM_STICKY_THRESH;
|
coeffs->param_changed |= BW_ONE_POLE_PARAM_STICKY_THRESH;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
|
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
* <li>Added overladed C++ <code>process()</code> function taking
|
* <li>Added overladed C++ <code>process()</code> function taking
|
||||||
* C-style arrays as arguments.</li>
|
* C-style arrays as arguments.</li>
|
||||||
* <li>Removed usage of reserved identifiers.</li>
|
* <li>Removed usage of reserved identifiers.</li>
|
||||||
|
* <li>Added pragmas to silence bogus GCC uninitialized variable
|
||||||
|
* warnings.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </li>
|
* </li>
|
||||||
* <li>Version <strong>0.6.0</strong>:
|
* <li>Version <strong>0.6.0</strong>:
|
||||||
@ -331,14 +333,20 @@ static inline void bw_peak_set_cutoff(bw_peak_coeffs *BW_RESTRICT coeffs, float
|
|||||||
static inline void bw_peak_set_Q(bw_peak_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_peak_set_Q(bw_peak_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->Q != value) {
|
if (coeffs->Q != value) {
|
||||||
coeffs->Q = value;
|
coeffs->Q = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_PEAK_PARAM_Q;
|
coeffs->param_changed |= BW_PEAK_PARAM_Q;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void bw_peak_set_peak_gain_lin(bw_peak_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_peak_set_peak_gain_lin(bw_peak_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->peak_gain != value) {
|
if (coeffs->peak_gain != value) {
|
||||||
coeffs->peak_gain = value;
|
coeffs->peak_gain = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_PEAK_PARAM_PEAK_GAIN;
|
coeffs->param_changed |= BW_PEAK_PARAM_PEAK_GAIN;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,14 +357,20 @@ static inline void bw_peak_set_peak_gain_dB(bw_peak_coeffs *BW_RESTRICT coeffs,
|
|||||||
static inline void bw_peak_set_bandwidth(bw_peak_coeffs *BW_RESTRICT coeffs, float value) {
|
static inline void bw_peak_set_bandwidth(bw_peak_coeffs *BW_RESTRICT coeffs, float value) {
|
||||||
if (coeffs->bandwidth != value) {
|
if (coeffs->bandwidth != value) {
|
||||||
coeffs->bandwidth = value;
|
coeffs->bandwidth = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_PEAK_PARAM_BANDWIDTH;
|
coeffs->param_changed |= BW_PEAK_PARAM_BANDWIDTH;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void bw_peak_set_use_bandwidth(bw_peak_coeffs *BW_RESTRICT coeffs, char value) {
|
static inline void bw_peak_set_use_bandwidth(bw_peak_coeffs *BW_RESTRICT coeffs, char value) {
|
||||||
if ((coeffs->use_bandwidth && !value) || (!coeffs->use_bandwidth && value)) {
|
if ((coeffs->use_bandwidth && !value) || (!coeffs->use_bandwidth && value)) {
|
||||||
coeffs->use_bandwidth = value;
|
coeffs->use_bandwidth = value;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
coeffs->param_changed |= BW_PEAK_PARAM_Q | BW_PEAK_PARAM_BANDWIDTH;
|
coeffs->param_changed |= BW_PEAK_PARAM_Q | BW_PEAK_PARAM_BANDWIDTH;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user