Skip to content

Commit

Permalink
Merge pull request #35 from jasp00/gcc-warnings
Browse files Browse the repository at this point in the history
Fix GCC 5.3.1 warnings
  • Loading branch information
swh authored Oct 17, 2016
2 parents 110374f + 6d71b1b commit 8b50f34
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions hermes_filter_1200.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ inline void setup_f_svf(sv_filter *sv, const float fs, const float fc) {
/* Run one sample through the SV filter. Filter is by andy@vellocet */
inline float run_svf(sv_filter *sv, float in) {
static inline float run_svf(sv_filter *sv, float in) {
float out;
int i;
Expand All @@ -124,7 +124,7 @@ inline float run_svf(sv_filter *sv, float in) {
return out;
}
inline int wave_tbl(const float wave) {
static inline int wave_tbl(const float wave) {
switch (f_round(wave)) {
case 0:
return BLO_SINE;
Expand Down
6 changes: 3 additions & 3 deletions imp_1199.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#define MK_IMP(i) impulse2freq(c, i, IMP_LENGTH(i), impulse_freq[c]); c++
inline void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out);
static inline void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out);
#include "impulses/all.h"
Expand All @@ -55,9 +55,9 @@
unsigned int fft_length[IMPULSES];
#ifdef __clang__
void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out)
static void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out)
#else
inline void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out)
static inline void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out)
#endif
{
fftw_real impulse_time[MAX_FFT_LENGTH];
Expand Down
6 changes: 3 additions & 3 deletions impulses/all.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Generated file, do not edit */

#define IMPULSES 21
#define IMPULSES 21

#include "impulses/01-unit.h"
#include "impulses/02-steves-flat.h"
Expand All @@ -25,9 +25,9 @@
#include "impulses/21-matchless-chieftain-sm57-off.h"

#ifdef __clang__
void mk_imps(fftw_real **impulse_freq)
static void mk_imps(fftw_real **impulse_freq)
#else
inline void mk_imps(fftw_real **impulse_freq)
static inline void mk_imps(fftw_real **impulse_freq)
#endif
{
int c = 0;
Expand Down
6 changes: 5 additions & 1 deletion impulses/mkall-h.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ echo "#define IMPULSES $count" >> all.h
echo "" >> all.h
ls -1 [0-9][0-9]* | awk '{print "#include \"impulses/" $0 "\""}' >> all.h
echo "" >> all.h
echo "inline void mk_imps(fftw_real **impulse_freq)" >> all.h
echo "#ifdef __clang__" >> all.h
echo "static void mk_imps(fftw_real **impulse_freq)" >> all.h
echo "#else" >> all.h
echo "static inline void mk_imps(fftw_real **impulse_freq)" >> all.h
echo "#endif" >> all.h
echo "{" >> all.h
echo " int c = 0;" >> all.h
ls -1 [0-9][0-9]* | sed 's/...//;s/\.h//;s/-/_/g' | awk '{print "\tMK_IMP(" $0 ");"}' >> all.h
Expand Down
2 changes: 1 addition & 1 deletion retro_flange_1208.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define BASE_BUFFER 0.001 // Base buffer length (s)
inline LADSPA_Data sat(LADSPA_Data x, float q, float dist) {
static inline LADSPA_Data sat(LADSPA_Data x, float q, float dist) {
if (x == q) {
return 1.0f / dist + q / (1.0f - f_exp(dist * q));
}
Expand Down
6 changes: 2 additions & 4 deletions util/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
* this could be sped up by vector operations
*/

static inline void buffer_sub(const float* a, const float *b, const float *c, int cnt) {
static inline void buffer_sub(const float* a, const float *b, float *c, int cnt) {
int i;
float *h;
h = c;
for(i=0;i<cnt;++i)
*h++ = *a++ - *b++;
*c++ = *a++ - *b++;
}

#endif

0 comments on commit 8b50f34

Please sign in to comment.