summaryrefslogtreecommitdiff
path: root/gtk2_ardour/gtk_pianokeyboard.c
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-02-22 15:21:50 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-02-22 15:21:50 -0500
commit52cb19669530ac4337ee94c45d31e91049785464 (patch)
tree979a6a48ef38311bd14706db3797c2e2846a53cb /gtk2_ardour/gtk_pianokeyboard.c
parent6fa88273aa779be36dbe17f5d6c8566fcf22366b (diff)
Revert "Fix compilation warnings. (gtk2_ardour part)"
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
Diffstat (limited to 'gtk2_ardour/gtk_pianokeyboard.c')
-rw-r--r--gtk2_ardour/gtk_pianokeyboard.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk2_ardour/gtk_pianokeyboard.c b/gtk2_ardour/gtk_pianokeyboard.c
index 4f8d0db693..2be8cdf2b6 100644
--- a/gtk2_ardour/gtk_pianokeyboard.c
+++ b/gtk2_ardour/gtk_pianokeyboard.c
@@ -251,7 +251,7 @@ bind_key(PianoKeyboard *pk, const char *key, int note)
{
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));
}
static void
@@ -687,10 +687,7 @@ piano_keyboard_new(void)
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);