diff options
author | Julien de Kozak <jdekozak@hotmail.com> | 2013-03-23 14:33:20 +0100 |
---|---|---|
committer | Julien de Kozak <jdekozak@hotmail.com> | 2013-03-23 14:50:58 +0100 |
commit | 16f8fc06578dac939e9d26af2f016a2d42405d7a (patch) | |
tree | 0c3e0f7886eafcf3d9fcb271f0cf8773ee4e29cb /libs | |
parent | 268553ecd471e31d0a1a3976f02389260130e41d (diff) |
Fix some compilation warnings
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/midi_buffer.cc | 2 | ||||
-rw-r--r-- | libs/audiographer/private/gdither/gdither.cc | 2 | ||||
-rw-r--r-- | libs/audiographer/private/gdither/gdither_types.h | 3 | ||||
-rw-r--r-- | libs/audiographer/private/gdither/gdither_types_internal.h | 3 | ||||
-rw-r--r-- | libs/evoral/src/libsmf/smf.c | 6 | ||||
-rw-r--r-- | libs/qm-dsp/maths/MathUtilities.cpp | 2 | ||||
-rw-r--r-- | libs/rubberband/src/main.cpp | 2 |
7 files changed, 11 insertions, 9 deletions
diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc index 403434b6cc..b47c3ca152 100644 --- a/libs/ardour/midi_buffer.cc +++ b/libs/ardour/midi_buffer.cc @@ -84,7 +84,7 @@ MidiBuffer::read_from (const Buffer& src, framecnt_t nframes, framecnt_t dst_off assert (src.type() == DataType::MIDI); assert (&src != this); - const MidiBuffer& msrc = (MidiBuffer&) src; + const MidiBuffer& msrc = (const MidiBuffer&) src; assert (_capacity >= msrc.size()); diff --git a/libs/audiographer/private/gdither/gdither.cc b/libs/audiographer/private/gdither/gdither.cc index 966da47b06..fe9ecc655a 100644 --- a/libs/audiographer/private/gdither/gdither.cc +++ b/libs/audiographer/private/gdither/gdither.cc @@ -117,7 +117,7 @@ GDither gdither_new(GDitherType type, uint32_t channels, s->clamp_u = lrintf(s->scale); s->clamp_l = lrintf(-s->scale); break; - case 23: + case GDitherPerformanceTest: /* special performance test case */ s->scale = SCALE_S24; s->post_scale = 256; diff --git a/libs/audiographer/private/gdither/gdither_types.h b/libs/audiographer/private/gdither/gdither_types.h index bcc0097d7f..8cc1cdf60d 100644 --- a/libs/audiographer/private/gdither/gdither_types.h +++ b/libs/audiographer/private/gdither/gdither_types.h @@ -36,7 +36,8 @@ typedef enum { GDither16bit = 16, GDither32bit = 32, GDitherFloat = 25, - GDitherDouble = 54 + GDitherDouble = 54, + GDitherPerformanceTest = 23 } GDitherSize; typedef void *GDither; diff --git a/libs/audiographer/private/gdither/gdither_types_internal.h b/libs/audiographer/private/gdither/gdither_types_internal.h index 6cb0c48af9..7d8de9d18c 100644 --- a/libs/audiographer/private/gdither/gdither_types_internal.h +++ b/libs/audiographer/private/gdither/gdither_types_internal.h @@ -42,7 +42,8 @@ typedef enum { GDither16bit = 16, GDither32bit = 32, GDitherFloat = 25, - GDitherDouble = 54 + GDitherDouble = 54, + GDitherPerformanceTest = 23 } GDitherSize; typedef struct { diff --git a/libs/evoral/src/libsmf/smf.c b/libs/evoral/src/libsmf/smf.c index d62dc6d7eb..b79d7543b6 100644 --- a/libs/evoral/src/libsmf/smf.c +++ b/libs/evoral/src/libsmf/smf.c @@ -377,12 +377,12 @@ smf_event_delete(smf_event_t *event) static gint events_array_compare_function(gconstpointer aa, gconstpointer bb) { - smf_event_t *a, *b; + const smf_event_t *a, *b; /* "The comparison function for g_ptr_array_sort() doesn't take the pointers from the array as arguments, it takes pointers to the pointers in the array." */ - a = (smf_event_t *)*(gpointer *)aa; - b = (smf_event_t *)*(gpointer *)bb; + a = (const smf_event_t *)*(const gpointer *)aa; + b = (const smf_event_t *)*(const gpointer *)bb; if (a->time_pulses < b->time_pulses) return (-1); diff --git a/libs/qm-dsp/maths/MathUtilities.cpp b/libs/qm-dsp/maths/MathUtilities.cpp index 70a275912c..9b5b2fc992 100644 --- a/libs/qm-dsp/maths/MathUtilities.cpp +++ b/libs/qm-dsp/maths/MathUtilities.cpp @@ -265,7 +265,7 @@ void MathUtilities::circShift( double* pData, int length, int shift) int MathUtilities::compareInt (const void * a, const void * b) { - return ( *(int*)a - *(int*)b ); + return ( *(const int*)a - *(const int*)b ); } void MathUtilities::normalise(double *data, int length, NormaliseType type) diff --git a/libs/rubberband/src/main.cpp b/libs/rubberband/src/main.cpp index 4aef2338c5..1c80696180 100644 --- a/libs/rubberband/src/main.cpp +++ b/libs/rubberband/src/main.cpp @@ -43,7 +43,7 @@ using RubberBand::usleep; double tempo_convert(const char *str) { - const char *d = strchr((char *)str, ':'); + const char *d = strchr(str, ':'); if (!d || !*d) { double m = atof(str); |