Fix compilation warnings. (gtk2_ardour part)
This commit is contained in:
parent
1afbdaff58
commit
ad35ab78eb
|
@ -247,11 +247,11 @@ key_binding(PianoKeyboard *pk, const char *key)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
bind_key(PianoKeyboard *pk, const char *key, int note)
|
bind_key(PianoKeyboard *pk, char *key, int note)
|
||||||
{
|
{
|
||||||
assert(pk->key_bindings != NULL);
|
assert(pk->key_bindings != NULL);
|
||||||
|
|
||||||
g_hash_table_insert(pk->key_bindings, (const gpointer)key, (gpointer)((intptr_t)note));
|
g_hash_table_insert(pk->key_bindings, (gpointer)key, (gpointer)((intptr_t)note));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -686,7 +686,12 @@ piano_keyboard_new(void)
|
||||||
pk->note_being_pressed_using_mouse = -1;
|
pk->note_being_pressed_using_mouse = -1;
|
||||||
pk->last_key = 0;
|
pk->last_key = 0;
|
||||||
pk->monophonic = FALSE;
|
pk->monophonic = FALSE;
|
||||||
memset((void *)pk->notes, 0, sizeof(struct PKNote) * NNOTES);
|
|
||||||
|
/* Avoiding memset due to pk->notes being volatile. */
|
||||||
|
for (int i = 0; i<sizeof(struct PKNote)*NNOTES; i++) {
|
||||||
|
((volatile int*)pk->notes)[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
pk->key_bindings = g_hash_table_new(g_str_hash, g_str_equal);
|
pk->key_bindings = g_hash_table_new(g_str_hash, g_str_equal);
|
||||||
bind_keys_qwerty(pk);
|
bind_keys_qwerty(pk);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user