x42 / midifilter.lv2

LV2 plugins to filter midi events
https://x42-plugins.com/x42/x42-midifilter
GNU General Public License v2.0
70 stars 20 forks source link

clang warnings #16

Closed yurivict closed 6 years ago

yurivict commented 6 years ago
./filters/nodup.c:107:9: warning: taking the absolute value of unsigned type 'unsigned int' has no effect [-Wabsolute-value]
                                        && MSC_DIFF((self->memI[0] + tme)%MSC_MAX, self->memCI[chn][mst]) <= dupDeltaT) {
                                           ^
./midifilter.h:33:31: note: expanded from macro 'MSC_DIFF'
#define MSC_DIFF(NOW, THEN) ( abs((NOW) - (THEN)) < (MSC_MAX>>1) \
                              ^
./filters/nodup.c:107:9: note: remove the call to 'abs' since unsigned values cannot be negative
./midifilter.h:33:31: note: expanded from macro 'MSC_DIFF'
#define MSC_DIFF(NOW, THEN) ( abs((NOW) - (THEN)) < (MSC_MAX>>1) \
                              ^
In file included from midifilter.c:119:
In file included from ./filters.c:84:
./filters/quantize.c:129:21: warning: taking the absolute value of unsigned type 'unsigned int' has no effect [-Wabsolute-value]
                                double tdiff =  MSC_DIFF((self->memI[3] + delay + tme)%MSC_MAX, self->memCI[chn][key]);
                                                ^
./midifilter.h:33:31: note: expanded from macro 'MSC_DIFF'
#define MSC_DIFF(NOW, THEN) ( abs((NOW) - (THEN)) < (MSC_MAX>>1) \
                              ^
./filters/quantize.c:129:21: note: remove the call to 'abs' since unsigned values cannot be negative
./midifilter.h:33:31: note: expanded from macro 'MSC_DIFF'
#define MSC_DIFF(NOW, THEN) ( abs((NOW) - (THEN)) < (MSC_MAX>>1) \
                              ^