These fixes are wrong, not on their own, but because GtkPiano* should not be
using volatile. I'll fix that separately.
This reverts commit
ad35ab78ebafdf5fe82ad05f31476d4fa23fcb77.
Conflicts:
gtk2_ardour/gtk_pianokeyboard.c
{
assert(pk->key_bindings != NULL);
{
assert(pk->key_bindings != NULL);
- g_hash_table_insert(pk->key_bindings, (gpointer)key, (gpointer)((intptr_t)note));
+ g_hash_table_insert(pk->key_bindings, (const gpointer)key, (gpointer)((intptr_t)note));
pk->last_key = 0;
pk->monophonic = FALSE;
pk->last_key = 0;
pk->monophonic = FALSE;
- /* Avoiding memset due to pk->notes being volatile. */
- for (int i = 0; i<(int)sizeof(struct PKNote)*NNOTES; i++) {
- ((volatile int*)pk->notes)[i] = 0;
- }
+ memset((void *)pk->notes, 0, sizeof(struct PKNote) * NNOTES);
pk->key_bindings = g_hash_table_new(g_str_hash, g_str_equal);
bind_keys_qwerty(pk);
pk->key_bindings = g_hash_table_new(g_str_hash, g_str_equal);
bind_keys_qwerty(pk);