Fix some compilation warnings

This commit is contained in:
Julien de Kozak 2013-03-23 14:33:20 +01:00
parent 268553ecd4
commit 16f8fc0657
9 changed files with 13 additions and 11 deletions

View file

@ -1459,7 +1459,7 @@ ArdourStartup::info_scroller_update()
char buf[512]; char buf[512];
snprintf (buf, std::min(info_scroller_count,sizeof(buf)-1), "%s", ARDOUR_UI::instance()->announce_string().c_str() ); snprintf (buf, std::min(info_scroller_count,sizeof(buf)-1), "%s", ARDOUR_UI::instance()->announce_string().c_str() );
buf[info_scroller_count] = NULL; buf[info_scroller_count] = 0;
info_scroller_label.set_text (buf); info_scroller_label.set_text (buf);
info_scroller_label.show(); info_scroller_label.show();

View file

@ -676,7 +676,7 @@ set_pango_fontsize ()
/* FT2 rendering - used by GnomeCanvas, sigh */ /* FT2 rendering - used by GnomeCanvas, sigh */
pango_ft2_font_map_set_resolution ((PangoFT2FontMap*) pango_ft2_font_map_for_display(), val/1024, val/1024); pango_ft2_font_map_set_resolution ((PangoFT2FontMap*) pango_ft2_font_map_new(), val/1024, val/1024);
/* Cairo rendering, in case there is any */ /* Cairo rendering, in case there is any */

View file

@ -84,7 +84,7 @@ MidiBuffer::read_from (const Buffer& src, framecnt_t nframes, framecnt_t dst_off
assert (src.type() == DataType::MIDI); assert (src.type() == DataType::MIDI);
assert (&src != this); assert (&src != this);
const MidiBuffer& msrc = (MidiBuffer&) src; const MidiBuffer& msrc = (const MidiBuffer&) src;
assert (_capacity >= msrc.size()); assert (_capacity >= msrc.size());

View file

@ -117,7 +117,7 @@ GDither gdither_new(GDitherType type, uint32_t channels,
s->clamp_u = lrintf(s->scale); s->clamp_u = lrintf(s->scale);
s->clamp_l = lrintf(-s->scale); s->clamp_l = lrintf(-s->scale);
break; break;
case 23: case GDitherPerformanceTest:
/* special performance test case */ /* special performance test case */
s->scale = SCALE_S24; s->scale = SCALE_S24;
s->post_scale = 256; s->post_scale = 256;

View file

@ -36,7 +36,8 @@ typedef enum {
GDither16bit = 16, GDither16bit = 16,
GDither32bit = 32, GDither32bit = 32,
GDitherFloat = 25, GDitherFloat = 25,
GDitherDouble = 54 GDitherDouble = 54,
GDitherPerformanceTest = 23
} GDitherSize; } GDitherSize;
typedef void *GDither; typedef void *GDither;

View file

@ -42,7 +42,8 @@ typedef enum {
GDither16bit = 16, GDither16bit = 16,
GDither32bit = 32, GDither32bit = 32,
GDitherFloat = 25, GDitherFloat = 25,
GDitherDouble = 54 GDitherDouble = 54,
GDitherPerformanceTest = 23
} GDitherSize; } GDitherSize;
typedef struct { typedef struct {

View file

@ -377,12 +377,12 @@ smf_event_delete(smf_event_t *event)
static gint static gint
events_array_compare_function(gconstpointer aa, gconstpointer bb) 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 /* "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." */ from the array as arguments, it takes pointers to the pointers in the array." */
a = (smf_event_t *)*(gpointer *)aa; a = (const smf_event_t *)*(const gpointer *)aa;
b = (smf_event_t *)*(gpointer *)bb; b = (const smf_event_t *)*(const gpointer *)bb;
if (a->time_pulses < b->time_pulses) if (a->time_pulses < b->time_pulses)
return (-1); return (-1);

View file

@ -265,7 +265,7 @@ void MathUtilities::circShift( double* pData, int length, int shift)
int MathUtilities::compareInt (const void * a, const void * b) 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) void MathUtilities::normalise(double *data, int length, NormaliseType type)

View file

@ -43,7 +43,7 @@ using RubberBand::usleep;
double tempo_convert(const char *str) double tempo_convert(const char *str)
{ {
const char *d = strchr((char *)str, ':'); const char *d = strchr(str, ':');
if (!d || !*d) { if (!d || !*d) {
double m = atof(str); double m = atof(str);