[F] Fixed clang tidy warnings

This commit is contained in:
seleznevae 2019-01-01 19:02:12 +03:00
parent 06fdfc8490
commit 8e58d1b8c4
3 changed files with 6 additions and 6 deletions

View File

@ -4669,7 +4669,7 @@ static ptrdiff_t str_iter_width(const char *beg, const char *end)
static ptrdiff_t wcs_iter_width(const wchar_t *beg, const wchar_t *end)
{
assert(end >= beg);
return mk_wcswidth(beg, (end - beg));
return mk_wcswidth(beg, (size_t)(end - beg));
}
#endif /* FT_HAVE_WCHAR */
@ -5237,7 +5237,6 @@ fort_row_t *get_row_implementation(ft_table_t *table, size_t row, enum PolicyOnN
return *(fort_row_t **)vector_at(table->rows, row);
}
return NULL;
break;
case Create:
while (row >= vector_size(table->rows)) {
fort_row_t *new_row = create_row();
@ -5249,8 +5248,9 @@ fort_row_t *get_row_implementation(ft_table_t *table, size_t row, enum PolicyOnN
}
}
return *(fort_row_t **)vector_at(table->rows, row);
break;
}
assert(0 && "Shouldn't be here!");
return NULL;
}

View File

@ -17,7 +17,7 @@ static ptrdiff_t str_iter_width(const char *beg, const char *end)
static ptrdiff_t wcs_iter_width(const wchar_t *beg, const wchar_t *end)
{
assert(end >= beg);
return mk_wcswidth(beg, (end - beg));
return mk_wcswidth(beg, (size_t)(end - beg));
}
#endif /* FT_HAVE_WCHAR */

View File

@ -43,7 +43,6 @@ fort_row_t *get_row_implementation(ft_table_t *table, size_t row, enum PolicyOnN
return *(fort_row_t **)vector_at(table->rows, row);
}
return NULL;
break;
case Create:
while (row >= vector_size(table->rows)) {
fort_row_t *new_row = create_row();
@ -55,8 +54,9 @@ fort_row_t *get_row_implementation(ft_table_t *table, size_t row, enum PolicyOnN
}
}
return *(fort_row_t **)vector_at(table->rows, row);
break;
}
assert(0 && "Shouldn't be here!");
return NULL;
}