[F] Fixed warnings
This commit is contained in:
parent
feb6995ff3
commit
0467409d6c
@ -61,7 +61,7 @@ int main(void)
|
||||
ft_set_cell_option(table, FT_ANY_ROW, 1, FT_COPT_TEXT_ALIGN, FT_ALIGNED_LEFT);
|
||||
|
||||
ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER);
|
||||
ft_printf_ln(table, "Rank|Title|Year|Rating");
|
||||
ft_write_ln(table, "Rank", "Title", "Year", "Rating");
|
||||
|
||||
ft_write_ln(table, "1", "The Shawshank Redemption", "1994", "9.5");
|
||||
ft_write_ln(table, "2", "12 Angry Men", "1957", "8.8");
|
||||
|
11
lib/fort.c
11
lib/fort.c
@ -1699,7 +1699,7 @@ static int ft_row_printf_impl(ft_table_t *table, size_t row, const char *fmt, va
|
||||
|
||||
table->cur_col += new_cols;
|
||||
destroy_row(new_row);
|
||||
return new_cols;
|
||||
return (int)new_cols;
|
||||
|
||||
clear:
|
||||
destroy_row(new_row);
|
||||
@ -1746,7 +1746,7 @@ static int ft_row_wprintf_impl(ft_table_t *table, size_t row, const wchar_t *fmt
|
||||
|
||||
table->cur_col += new_cols;
|
||||
destroy_row(new_row);
|
||||
return new_cols;
|
||||
return (int)new_cols;
|
||||
|
||||
clear:
|
||||
destroy_row(new_row);
|
||||
@ -3633,10 +3633,13 @@ fort_status_t swap_row(fort_row_t *cur_row, fort_row_t *ins_row, size_t pos)
|
||||
size_t group_cell_number(const fort_row_t *row, size_t master_cell_col)
|
||||
{
|
||||
assert(row);
|
||||
const fort_cell_t *cell = get_cell_c(row, master_cell_col);
|
||||
if (cell == NULL)
|
||||
const fort_cell_t *master_cell = get_cell_c(row, master_cell_col);
|
||||
if (master_cell == NULL)
|
||||
return 0;
|
||||
|
||||
if (get_cell_type(master_cell) != GroupMasterCell)
|
||||
return 1;
|
||||
|
||||
size_t total_cols = vector_size(row->cells);
|
||||
size_t slave_col = master_cell_col + 1;
|
||||
while (slave_col < total_cols) {
|
||||
|
@ -163,7 +163,7 @@ static int ft_row_printf_impl(ft_table_t *table, size_t row, const char *fmt, va
|
||||
|
||||
table->cur_col += new_cols;
|
||||
destroy_row(new_row);
|
||||
return new_cols;
|
||||
return (int)new_cols;
|
||||
|
||||
clear:
|
||||
destroy_row(new_row);
|
||||
@ -210,7 +210,7 @@ static int ft_row_wprintf_impl(ft_table_t *table, size_t row, const wchar_t *fmt
|
||||
|
||||
table->cur_col += new_cols;
|
||||
destroy_row(new_row);
|
||||
return new_cols;
|
||||
return (int)new_cols;
|
||||
|
||||
clear:
|
||||
destroy_row(new_row);
|
||||
|
@ -125,10 +125,13 @@ fort_status_t swap_row(fort_row_t *cur_row, fort_row_t *ins_row, size_t pos)
|
||||
size_t group_cell_number(const fort_row_t *row, size_t master_cell_col)
|
||||
{
|
||||
assert(row);
|
||||
const fort_cell_t *cell = get_cell_c(row, master_cell_col);
|
||||
if (cell == NULL)
|
||||
const fort_cell_t *master_cell = get_cell_c(row, master_cell_col);
|
||||
if (master_cell == NULL)
|
||||
return 0;
|
||||
|
||||
if (get_cell_type(master_cell) != GroupMasterCell)
|
||||
return 1;
|
||||
|
||||
size_t total_cols = vector_size(row->cells);
|
||||
size_t slave_col = master_cell_col + 1;
|
||||
while (slave_col < total_cols) {
|
||||
|
Loading…
Reference in New Issue
Block a user