mirror of
https://gitee.com/openharmony/third_party_alsa-utils
synced 2024-11-23 07:00:15 +00:00
alsamixer: fix gcc warnings
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
d751320608
commit
6e90e4fe8e
@ -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;
|
||||
|
@ -16,7 +16,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "aconfig.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -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]);
|
||||
|
@ -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))
|
||||
|
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#define _ISOC99_SOURCE /* lrint() */
|
||||
#define _GNU_SOURCE /* exp10() */
|
||||
#include "aconfig.h"
|
||||
#include <math.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user