diff --git a/alsamixer/mainloop.c b/alsamixer/mainloop.c
index 79d81a9..a50109b 100644
--- a/alsamixer/mainloop.c
+++ b/alsamixer/mainloop.c
@@ -68,7 +68,7 @@ void mainloop(void)
{
struct pollfd *pollfds = NULL;
int nfds = 0, n;
- struct widget *active_widget;
+ const struct widget *active_widget;
unsigned short revents;
int key;
int err;
diff --git a/alsamixer/mem.c b/alsamixer/mem.c
index fa03a89..b6e1df2 100644
--- a/alsamixer/mem.c
+++ b/alsamixer/mem.c
@@ -16,7 +16,6 @@
* along with this program. If not, see .
*/
-#define _GNU_SOURCE
#include "aconfig.h"
#include
#include
diff --git a/alsamixer/mixer_controls.c b/alsamixer/mixer_controls.c
index cc98b64..9573517 100644
--- a/alsamixer/mixer_controls.c
+++ b/alsamixer/mixer_controls.c
@@ -216,7 +216,6 @@ static unsigned int create_controls_for_elem(snd_mixer_elem_t *elem, struct cont
{
unsigned int count = 0;
unsigned int i;
- unsigned int multich_flag;
unsigned int enum_index;
struct control *front_control = NULL;
bool has_pvol, has_psw;
@@ -286,7 +285,6 @@ static unsigned int create_controls_for_elem(snd_mixer_elem_t *elem, struct cont
++control;
++count;
} else {
- multich_flag = 0;
for (i = 0; i < ARRAY_SIZE(supported_channels); ++i)
has_channel[supported_channels[i]] =
snd_mixer_selem_has_playback_channel(elem, supported_channels[i]);
diff --git a/alsamixer/mixer_widget.c b/alsamixer/mixer_widget.c
index 0c2b9e0..5013861 100644
--- a/alsamixer/mixer_widget.c
+++ b/alsamixer/mixer_widget.c
@@ -444,7 +444,6 @@ static void balance_volumes(void)
{
struct control *control;
double left, right;
- int err;
control = get_focus_control(TYPE_PVOLUME | TYPE_CVOLUME);
if (!control || !(control->flags & HAS_VOLUME_1))
diff --git a/alsamixer/volume_mapping.c b/alsamixer/volume_mapping.c
index 1c0d7c4..94bd0fe 100644
--- a/alsamixer/volume_mapping.c
+++ b/alsamixer/volume_mapping.c
@@ -31,7 +31,6 @@
*/
#define _ISOC99_SOURCE /* lrint() */
-#define _GNU_SOURCE /* exp10() */
#include "aconfig.h"
#include
#include
diff --git a/alsamixer/widget.c b/alsamixer/widget.c
index 75da4c2..464f440 100644
--- a/alsamixer/widget.c
+++ b/alsamixer/widget.c
@@ -33,7 +33,7 @@ static void widget_handle_key(int key)
static void update_cursor_visibility(void)
{
- struct widget *active_widget;
+ const struct widget *active_widget;
active_widget = get_active_widget();
if (active_widget &&
@@ -112,7 +112,7 @@ void widget_free(struct widget *widget)
update_cursor_visibility();
}
-struct widget *get_active_widget(void)
+const struct widget *get_active_widget(void)
{
PANEL *active_panel;
@@ -126,7 +126,7 @@ struct widget *get_active_widget(void)
void window_size_changed(void)
{
PANEL *panel, *below;
- struct widget *widget;
+ const struct widget *widget;
getmaxyx(stdscr, screen_lines, screen_cols);
if (tigetflag("xenl") != 1 && tigetflag("am") != 1)
diff --git a/alsamixer/widget.h b/alsamixer/widget.h
index 6adb526..58a132c 100644
--- a/alsamixer/widget.h
+++ b/alsamixer/widget.h
@@ -27,7 +27,7 @@ void widget_init(struct widget *widget,
int lines_, int cols, int y, int x,
chtype bkgd, unsigned int flags);
void widget_free(struct widget *widget);
-struct widget *get_active_widget(void);
+const struct widget *get_active_widget(void);
void window_size_changed(void);
#endif