From a3c05733c59a749d31cb6cb720f2718eb9f44933 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Sat, 20 Feb 2016 16:02:05 +0000
Subject: [PATCH] widget/buttonbar.c: cleanup -Wcast-qual warning
buttonbar.c: In function 'buttonbar_set_label':
../../lib/widget/widget-common.h:13:20: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
#define WIDGET(x) ((Widget *)(x))
^
buttonbar.c:280:40: note: in expansion of macro 'WIDGET'
bb->labels[idx - 1].receiver = WIDGET (receiver);
^
Signed-off-by: Andreas Mohr <and@gmx.li>
---
lib/widget/buttonbar.c | 2 +-
lib/widget/buttonbar.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/widget/buttonbar.c b/lib/widget/buttonbar.c
index f879969..3049991 100644
a
|
b
|
buttonbar_new (gboolean visible) |
262 | 262 | |
263 | 263 | void |
264 | 264 | buttonbar_set_label (WButtonBar * bb, int idx, const char *text, |
265 | | const struct global_keymap_t *keymap, const Widget * receiver) |
| 265 | const struct global_keymap_t *keymap, Widget * receiver) |
266 | 266 | { |
267 | 267 | if ((bb != NULL) && (idx >= 1) && (idx <= BUTTONBAR_LABELS_NUM)) |
268 | 268 | { |
diff --git a/lib/widget/buttonbar.h b/lib/widget/buttonbar.h
index 0efce71..011866e 100644
a
|
b
|
struct global_keymap_t; |
42 | 42 | |
43 | 43 | WButtonBar *buttonbar_new (gboolean visible); |
44 | 44 | void buttonbar_set_label (WButtonBar * bb, int idx, const char *text, |
45 | | const struct global_keymap_t *keymap, const Widget * receiver); |
| 45 | const struct global_keymap_t *keymap, Widget * receiver); |
46 | 46 | WButtonBar *find_buttonbar (const WDialog * h); |
47 | 47 | |
48 | 48 | /*** inline functions ****************************************************************************/ |