1
1

Code cleanup for compile with -Werror option

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Этот коммит содержится в:
Slava Zanko 2010-05-21 23:38:24 +03:00 коммит произвёл Andrew Borodin
родитель 916eba33a7
Коммит e3f7a0544b
3 изменённых файлов: 11 добавлений и 11 удалений

@ -185,7 +185,7 @@ static struct
/* *INDENT-ON* */
};
#define LAYOUT_OPTIONS_COUNT sizeof (check_options) / sizeof (check_options[0])
#define LAYOUT_OPTIONS_COUNT (sizeof (check_options) / sizeof (check_options[0]))
#define OTHER_OPTIONS_COUNT (LAYOUT_OPTIONS_COUNT - 1)
static gsize first_width;
@ -385,7 +385,7 @@ init_layout (void)
{
static int i18n_layt_flag = 0;
static int b1, b2, b3;
int i = sizeof (s_split_direction) / sizeof (char *);
size_t i = sizeof (s_split_direction) / sizeof (char *);
const char *ok_button = _("&OK");
const char *cancel_button = _("&Cancel");
const char *save_button = _("&Save");
@ -410,7 +410,7 @@ init_layout (void)
first_width = l1;
}
for (i = 0; i < LAYOUT_OPTIONS_COUNT; i++)
for (i = 0; i < (size_t) LAYOUT_OPTIONS_COUNT; i++)
{
check_options[i].text = _(check_options[i].text);
l1 = str_term_width1 (check_options[i].text) + 7;
@ -469,7 +469,7 @@ init_layout (void)
add_widget (layout_dlg, button_new (11, b1, B_ENTER, DEFPUSH_BUTTON, ok_button, 0));
#define XTRACT(i) *check_options[i].variable, check_options[i].text
for (i = 0; i < OTHER_OPTIONS_COUNT; i++)
for (i = 0; i < (size_t) OTHER_OPTIONS_COUNT; i++)
{
check_options[i].widget =
check_new (OTHER_OPTIONS_COUNT - i + 2, 7 + first_width, XTRACT (i));
@ -531,7 +531,7 @@ void
layout_box (void)
{
int result;
int i;
size_t i;
int layout_do_change = 0;
init_layout ();
@ -540,8 +540,8 @@ layout_box (void)
if (result == B_ENTER || result == B_EXIT)
{
for (i = 0; i < LAYOUT_OPTIONS_COUNT; i++)
if (check_options[i].widget)
for (i = 0; i < (size_t) LAYOUT_OPTIONS_COUNT; i++)
if (check_options[i].widget != NULL)
*check_options[i].variable = check_options[i].widget->state & C_BOOL;
horizontal_split = radio_widget->sel;
first_panel_size = _first_panel_size;

@ -141,7 +141,7 @@ configure_box (void)
{
/* radio button */
size_t j;
for (j = 0; j < pause_options_num; j++)
for (j = 0; j < (size_t) pause_options_num; j++)
pause_options[j] = _(pause_options[j]);
}
else if (i == 17)
@ -170,7 +170,7 @@ configure_box (void)
if ((i < 13) || (i == 18) || (i > 19))
c_len = max (c_len, str_term_width1 (quick_widgets[i].u.checkbox.text) + 3);
/* radiobuttons */
for (i = 0; i < pause_options_num; i++)
for (i = 0; i < (size_t) pause_options_num; i++)
c_len = max (c_len, str_term_width1 (pause_options[i]) + 3);
/* label + input */
l_len = str_term_width1 (quick_widgets[17].u.label.text);
@ -210,7 +210,7 @@ configure_box (void)
quick_widgets[1].relative_x = quick_widgets[2].relative_x + b2_len + 1;
quick_widgets[0].relative_x = quick_widgets[1].relative_x + b1_len + 1;
g_snprintf (time_out, sizeof (time_out), "%ld", old_esc_mode_timeout);
g_snprintf (time_out, sizeof (time_out), "%d", old_esc_mode_timeout);
qd_result = quick_dialog (&Quick_input);

@ -119,7 +119,7 @@ mcview_move_up (mcview_t * view, off_t lines)
{
size_t last_row_length = (view->dpy_start - new_offset) % view->data_area.width;
if (last_row_length != 0 && cur_bol == view->dpy_start)
new_offset = max (new_offset, view->dpy_start - last_row_length);
new_offset = max (new_offset, (off_t) (view->dpy_start - last_row_length));
else
new_offset = max (new_offset, view->dpy_start - view->data_area.width);
}