[F] Fixed warnings with -Wpedantic option
This commit is contained in:
@@ -34,8 +34,10 @@ static int create_simple_table_and_show(void)
|
||||
result = 1;
|
||||
goto exit;
|
||||
}
|
||||
// if (set_test_options_for_table(table) != FT_SUCCESS)
|
||||
// return 2;
|
||||
/*
|
||||
if (set_test_options_for_table(table) != FT_SUCCESS)
|
||||
return 2;
|
||||
*/
|
||||
|
||||
if (ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER) != FT_SUCCESS) {
|
||||
result = 3;
|
||||
@@ -73,7 +75,7 @@ static int create_simple_table_and_show(void)
|
||||
"| 3 | c | 234 | 3.140000 |\n"
|
||||
"| | | | |\n"
|
||||
"+---+---+-----+----------+\n";
|
||||
// assert_str_equal(table_str, table_str_etalon);
|
||||
/*assert_str_equal(table_str, table_str_etalon);*/
|
||||
if (strcmp(table_str, table_str_etalon) != 0) {
|
||||
result = 8;
|
||||
goto exit;
|
||||
|
@@ -84,7 +84,6 @@ struct ft_table *create_test_int_table(int set_test_opts)
|
||||
assert_true(table != NULL);
|
||||
|
||||
ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER);
|
||||
// int n = ft_printf_ln(table, "%d|%d|%d|%d", 3, 4, 55, 67);
|
||||
int n = ft_write_ln(table, "3", "4", "55", "67");
|
||||
assert(n == FT_SUCCESS);
|
||||
|
||||
@@ -115,7 +114,6 @@ struct ft_table *create_test_int_wtable(int set_test_opts)
|
||||
assert_true(table != NULL);
|
||||
|
||||
ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER);
|
||||
// int n = ft_printf_ln(table, "%d|%d|%d|%d", 3, 4, 55, 67);
|
||||
int n = ft_wwrite_ln(table, L"3", L"4", L"55", L"67");
|
||||
assert(n == FT_SUCCESS);
|
||||
|
||||
|
@@ -49,7 +49,7 @@ struct test_case {
|
||||
#define assert_str_equal(str1, str2) \
|
||||
if (strcmp(str1, str2) != 0) \
|
||||
{ \
|
||||
fprintf(stderr, "%s:%d(%s):Abort! Not equals strings:\n",__FILE__,__LINE__, __FUNCTION__); \
|
||||
fprintf(stderr, "%s:%d(%s):Abort! Not equals strings:\n",__FILE__,__LINE__, __func__); \
|
||||
fprintf(stderr, "Left string:\n%s\n", str1); \
|
||||
fprintf(stderr, "Right string:\n%s\n", str2); \
|
||||
exit(EXIT_FAILURE); \
|
||||
@@ -58,7 +58,7 @@ struct test_case {
|
||||
#define assert_wcs_equal(str1, str2) \
|
||||
if (wcscmp(str1, str2) != 0) \
|
||||
{ \
|
||||
fprintf(stderr, "%s:%d(%s):Abort! Not equals strings:\n",__FILE__,__LINE__, __FUNCTION__); \
|
||||
fprintf(stderr, "%s:%d(%s):Abort! Not equals strings:\n",__FILE__,__LINE__, __func__); \
|
||||
setlocale(LC_CTYPE, ""); \
|
||||
fwprintf(stdout, L"Left string:\n%ls\n", str1); \
|
||||
fwprintf(stdout, L"Right string:\n%ls\n", str2); \
|
||||
|
Reference in New Issue
Block a user