From dfe70d8fbb760ee4d7b36e6ccf59ba592c6dd3db Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 4 Feb 2003 16:03:36 +0000 Subject: [PATCH] - fixed compile warnings on gcc3.3. --- alsamixer/alsamixer.c | 7 ++++--- amixer/amixer.c | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/alsamixer/alsamixer.c b/alsamixer/alsamixer.c index ce8ad8e..7ea3238 100644 --- a/alsamixer/alsamixer.c +++ b/alsamixer/alsamixer.c @@ -983,7 +983,7 @@ mixer_draw_frame (void) mixer_dc (DC_TEXT); sprintf (string, "%s", mixer_card_name); max_len = mixer_max_x - 2 - 6 - 2; - if (strlen (string) > max_len) + if ((int)strlen (string) > max_len) string[max_len] = 0; addstr (string); @@ -994,7 +994,7 @@ mixer_draw_frame (void) mixer_dc (DC_TEXT); sprintf (string, "%s", mixer_device_name); max_len = mixer_max_x - 2 - 6 - 2; - if (strlen (string) > max_len) + if ((int)strlen (string) > max_len) string[max_len] = 0; addstr (string); @@ -1088,7 +1088,8 @@ mixer_show_text (char *title, float hoffs, voffs; char *p, *text_offs = text; int x1, x2, y1, y2; - int i, n, l, r, block, stipple; + int i, n, l, r; + unsigned long block, stipple; /* coords */ diff --git a/amixer/amixer.c b/amixer/amixer.c index 1b12eed..46c3d43 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -836,7 +836,7 @@ static int parse_control_id(const char *str, snd_ctl_elem_id_t *id) if (*str == '\'' || *str == '\"') { c = *str++; while (*str && *str != c) { - if (size < sizeof(buf)) { + if (size < (int)sizeof(buf)) { *ptr++ = *str; size++; } @@ -846,7 +846,7 @@ static int parse_control_id(const char *str, snd_ctl_elem_id_t *id) str++; } else { while (*str && *str != ',') { - if (size < sizeof(buf)) { + if (size < (int)sizeof(buf)) { *ptr++ = *str; size++; } @@ -894,7 +894,7 @@ static int parse_simple_id(const char *str, snd_mixer_selem_id_t *sid) size = 1; /* for '\0' */ if (*str != '"' && *str != '\'') { while (*str && *str != ',') { - if (size < sizeof(buf)) { + if (size < (int)sizeof(buf)) { *ptr++ = *str; size++; } @@ -903,7 +903,7 @@ static int parse_simple_id(const char *str, snd_mixer_selem_id_t *sid) } else { c = *str++; while (*str && *str != c) { - if (size < sizeof(buf)) { + if (size < (int)sizeof(buf)) { *ptr++ = *str; size++; }