From: Kevin Day Date: Tue, 10 May 2022 03:55:28 +0000 (-0500) Subject: Cleanup: Add -Wall when running tests and fix problems exposed by warnings. X-Git-Tag: 0.5.10~158 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=47d4fd4d915d7da1bda90a2b63ba0a776b061c4d;p=fll Cleanup: Add -Wall when running tests and fix problems exposed by warnings. --- diff --git a/level_0/f_account/data/build/settings-tests b/level_0/f_account/data/build/settings-tests index 9796b6793..0d22771a4 100644 --- a/level_0/f_account/data/build/settings-tests +++ b/level_0/f_account/data/build/settings-tests @@ -47,6 +47,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_capability/data/build/settings-tests b/level_0/f_capability/data/build/settings-tests index 9b7cd0352..591492d8a 100644 --- a/level_0/f_capability/data/build/settings-tests +++ b/level_0/f_capability/data/build/settings-tests @@ -49,6 +49,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_capability/tests/unit/c/test-capability-copy.c b/level_0/f_capability/tests/unit/c/test-capability-copy.c index c9407f944..cd0ff404b 100644 --- a/level_0/f_capability/tests/unit/c/test-capability-copy.c +++ b/level_0/f_capability/tests/unit/c/test-capability-copy.c @@ -11,18 +11,6 @@ void test__f_capability_copy__fails(void **state) { const f_capability_t capability_1 = f_capability_t_initialize; f_capability_t capability_2 = f_capability_t_initialize; - int errnos[] = { - EINVAL, - ENOMEM, - mock_errno_generic, - }; - - f_status_t statuss[] = { - F_parameter, - F_memory_not, - F_failure, - }; - for (int i = 0; i < 3; ++i) { will_return(__wrap_cap_dup, true); diff --git a/level_0/f_capability/tests/unit/c/test-capability-owner_set.c b/level_0/f_capability/tests/unit/c/test-capability-owner_set.c index 7e57945f4..75f85a96a 100644 --- a/level_0/f_capability/tests/unit/c/test-capability-owner_set.c +++ b/level_0/f_capability/tests/unit/c/test-capability-owner_set.c @@ -50,7 +50,7 @@ void test__f_capability_owner_set__fails(void **state) { void test__f_capability_owner_set__works(void **state) { const f_capability_t capability = f_capability_t_initialize; - const uid_t id; + const uid_t id = 0; #if defined(_di_libcap_) || defined(_libcap_legacy_only_) printf("[ WARN ] f_capability_owner_set() is not implemented and cannot be fully tested.\n"); diff --git a/level_0/f_capability/tests/unit/c/test-capability-to_name.c b/level_0/f_capability/tests/unit/c/test-capability-to_name.c index 96ab54328..556cd99dd 100644 --- a/level_0/f_capability/tests/unit/c/test-capability-to_name.c +++ b/level_0/f_capability/tests/unit/c/test-capability-to_name.c @@ -69,6 +69,7 @@ void test__f_capability_to_name__works(void **state) { #if defined(_di_libcap_) assert_int_equal(F_status_set_fine(status), F_implemented_not); #else + assert_int_equal(status, F_none); assert_string_equal(name.string, string); assert_int_equal(name.used, 9); #endif // defined(_di_libcap_) diff --git a/level_0/f_capability/tests/unit/c/test-capability-to_text.c b/level_0/f_capability/tests/unit/c/test-capability-to_text.c index 4308e3a7c..49e376aa5 100644 --- a/level_0/f_capability/tests/unit/c/test-capability-to_text.c +++ b/level_0/f_capability/tests/unit/c/test-capability-to_text.c @@ -70,6 +70,7 @@ void test__f_capability_to_text__works(void **state) { #if defined(_di_libcap_) assert_int_equal(F_status_set_fine(status), F_implemented_not); #else + assert_int_equal(status, F_none); assert_string_equal(text.string, string); assert_int_equal(text.used, 9); #endif // defined(_di_libcap_) diff --git a/level_0/f_color/data/build/settings-tests b/level_0/f_color/data/build/settings-tests index 16dff8483..650a780c9 100644 --- a/level_0/f_color/data/build/settings-tests +++ b/level_0/f_color/data/build/settings-tests @@ -47,6 +47,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_color/tests/unit/c/test-color-save_1.c b/level_0/f_color/tests/unit/c/test-color-save_1.c index 2cdb00e8a..d2750e966 100644 --- a/level_0/f_color/tests/unit/c/test-color-save_1.c +++ b/level_0/f_color/tests/unit/c/test-color-save_1.c @@ -8,7 +8,6 @@ extern "C" { #ifndef _di_level_0_parameter_checking_ void test__f_color_save_1_parameter_checking(void **state) { - f_string_static_t buffer = f_string_static_t_initialize; const f_color_format_t format = f_color_format_t_initialize; const f_string_static_t color = macro_f_string_static_t_initialize2("color", 5); diff --git a/level_0/f_color/tests/unit/c/test-color-save_2.c b/level_0/f_color/tests/unit/c/test-color-save_2.c index c61832c64..68eb51297 100644 --- a/level_0/f_color/tests/unit/c/test-color-save_2.c +++ b/level_0/f_color/tests/unit/c/test-color-save_2.c @@ -8,7 +8,6 @@ extern "C" { #ifndef _di_level_0_parameter_checking_ void test__f_color_save_2_parameter_checking(void **state) { - f_string_static_t buffer = f_string_static_t_initialize; const f_color_format_t format = f_color_format_t_initialize; const f_string_static_t color = macro_f_string_static_t_initialize2("color", 5); diff --git a/level_0/f_color/tests/unit/c/test-color-save_3.c b/level_0/f_color/tests/unit/c/test-color-save_3.c index e3e4c0ed1..db7b0ab28 100644 --- a/level_0/f_color/tests/unit/c/test-color-save_3.c +++ b/level_0/f_color/tests/unit/c/test-color-save_3.c @@ -8,7 +8,6 @@ extern "C" { #ifndef _di_level_0_parameter_checking_ void test__f_color_save_3_parameter_checking(void **state) { - f_string_static_t buffer = f_string_static_t_initialize; const f_color_format_t format = f_color_format_t_initialize; const f_string_static_t color = macro_f_string_static_t_initialize2("color", 5); diff --git a/level_0/f_color/tests/unit/c/test-color-save_4.c b/level_0/f_color/tests/unit/c/test-color-save_4.c index 5656ab897..2db5d12cb 100644 --- a/level_0/f_color/tests/unit/c/test-color-save_4.c +++ b/level_0/f_color/tests/unit/c/test-color-save_4.c @@ -8,7 +8,6 @@ extern "C" { #ifndef _di_level_0_parameter_checking_ void test__f_color_save_4_parameter_checking(void **state) { - f_string_static_t buffer = f_string_static_t_initialize; const f_color_format_t format = f_color_format_t_initialize; const f_string_static_t color = macro_f_string_static_t_initialize2("color", 5); diff --git a/level_0/f_color/tests/unit/c/test-color-save_5.c b/level_0/f_color/tests/unit/c/test-color-save_5.c index e5d57ceb6..3e983da60 100644 --- a/level_0/f_color/tests/unit/c/test-color-save_5.c +++ b/level_0/f_color/tests/unit/c/test-color-save_5.c @@ -8,7 +8,6 @@ extern "C" { #ifndef _di_level_0_parameter_checking_ void test__f_color_save_5_parameter_checking(void **state) { - f_string_static_t buffer = f_string_static_t_initialize; const f_color_format_t format = f_color_format_t_initialize; const f_string_static_t color = macro_f_string_static_t_initialize2("color", 5); diff --git a/level_0/f_console/data/build/settings-tests b/level_0/f_console/data/build/settings-tests index 80f5ef477..99de552ed 100644 --- a/level_0/f_console/data/build/settings-tests +++ b/level_0/f_console/data/build/settings-tests @@ -47,6 +47,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_control_group/data/build/settings-tests b/level_0/f_control_group/data/build/settings-tests index 834be3903..cc75343b2 100644 --- a/level_0/f_control_group/data/build/settings-tests +++ b/level_0/f_control_group/data/build/settings-tests @@ -47,6 +47,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_conversion/data/build/settings-tests b/level_0/f_conversion/data/build/settings-tests index 34df4cb70..bec86eefb 100644 --- a/level_0/f_conversion/data/build/settings-tests +++ b/level_0/f_conversion/data/build/settings-tests @@ -47,6 +47,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_conversion/tests/unit/c/test-conversion-character_to_binary.c b/level_0/f_conversion/tests/unit/c/test-conversion-character_to_binary.c index b3a4a8694..de97bed27 100644 --- a/level_0/f_conversion/tests/unit/c/test-conversion-character_to_binary.c +++ b/level_0/f_conversion/tests/unit/c/test-conversion-character_to_binary.c @@ -47,7 +47,7 @@ void test__f_conversion_character_to_binary__works(void **state) { number = 255; - const f_status_t status = f_conversion_character_to_binary(i, &number); + f_conversion_character_to_binary(i, &number); switch (i) { case '0': diff --git a/level_0/f_conversion/tests/unit/c/test-conversion-character_to_decimal.c b/level_0/f_conversion/tests/unit/c/test-conversion-character_to_decimal.c index 606dd17bc..74b679af0 100644 --- a/level_0/f_conversion/tests/unit/c/test-conversion-character_to_decimal.c +++ b/level_0/f_conversion/tests/unit/c/test-conversion-character_to_decimal.c @@ -55,7 +55,7 @@ void test__f_conversion_character_to_decimal__works(void **state) { number = 255; - const f_status_t status = f_conversion_character_to_decimal(i, &number); + f_conversion_character_to_decimal(i, &number); switch (i) { case '0': diff --git a/level_0/f_conversion/tests/unit/c/test-conversion-character_to_duodecimal.c b/level_0/f_conversion/tests/unit/c/test-conversion-character_to_duodecimal.c index 07ad74625..47d37279d 100644 --- a/level_0/f_conversion/tests/unit/c/test-conversion-character_to_duodecimal.c +++ b/level_0/f_conversion/tests/unit/c/test-conversion-character_to_duodecimal.c @@ -59,7 +59,7 @@ void test__f_conversion_character_to_duodecimal__works(void **state) { number = 255; - const f_status_t status = f_conversion_character_to_duodecimal(i, &number); + f_conversion_character_to_duodecimal(i, &number); switch (i) { case '0': diff --git a/level_0/f_conversion/tests/unit/c/test-conversion-character_to_hexidecimal.c b/level_0/f_conversion/tests/unit/c/test-conversion-character_to_hexidecimal.c index 700c8f6ea..ff3d4e349 100644 --- a/level_0/f_conversion/tests/unit/c/test-conversion-character_to_hexidecimal.c +++ b/level_0/f_conversion/tests/unit/c/test-conversion-character_to_hexidecimal.c @@ -67,7 +67,7 @@ void test__f_conversion_character_to_hexidecimal__works(void **state) { number = 255; - const f_status_t status = f_conversion_character_to_hexidecimal(i, &number); + f_conversion_character_to_hexidecimal(i, &number); switch (i) { case '0': diff --git a/level_0/f_conversion/tests/unit/c/test-conversion-character_to_octal.c b/level_0/f_conversion/tests/unit/c/test-conversion-character_to_octal.c index 5c454bfc0..490ccd3dc 100644 --- a/level_0/f_conversion/tests/unit/c/test-conversion-character_to_octal.c +++ b/level_0/f_conversion/tests/unit/c/test-conversion-character_to_octal.c @@ -53,7 +53,7 @@ void test__f_conversion_character_to_octal__works(void **state) { number = 255; - const f_status_t status = f_conversion_character_to_octal(i, &number); + f_conversion_character_to_octal(i, &number); switch (i) { case '0': diff --git a/level_0/f_directory/data/build/settings-tests b/level_0/f_directory/data/build/settings-tests index dd21d113f..0244e5a4a 100644 --- a/level_0/f_directory/data/build/settings-tests +++ b/level_0/f_directory/data/build/settings-tests @@ -47,6 +47,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_environment/data/build/settings-tests b/level_0/f_environment/data/build/settings-tests index 3428a36f0..2678679c8 100644 --- a/level_0/f_environment/data/build/settings-tests +++ b/level_0/f_environment/data/build/settings-tests @@ -49,6 +49,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_execute/data/build/settings-tests b/level_0/f_execute/data/build/settings-tests index dc8c67d12..9ca24d1f6 100644 --- a/level_0/f_execute/data/build/settings-tests +++ b/level_0/f_execute/data/build/settings-tests @@ -49,6 +49,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_file/data/build/settings-tests b/level_0/f_file/data/build/settings-tests index 9108db4a2..6865f9b21 100644 --- a/level_0/f_file/data/build/settings-tests +++ b/level_0/f_file/data/build/settings-tests @@ -48,6 +48,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_file/tests/unit/c/test-file-clone.c b/level_0/f_file/tests/unit/c/test-file-clone.c index 1bc42db37..1d188514c 100644 --- a/level_0/f_file/tests/unit/c/test-file-clone.c +++ b/level_0/f_file/tests/unit/c/test-file-clone.c @@ -349,15 +349,6 @@ void test__f_file_clone__fails_for_other(void **state) { F_file_type_socket_d, }; - f_status_t statuss[] = { - F_supported_not, - F_supported_not, - F_supported_not, - F_supported_not, - F_supported_not, - F_supported_not, - }; - struct stat statistics; memset(&statistics, 0, sizeof(struct stat)); diff --git a/level_0/f_file/tests/unit/c/test-file-link_read.c b/level_0/f_file/tests/unit/c/test-file-link_read.c index 2f4398fce..0ab037803 100644 --- a/level_0/f_file/tests/unit/c/test-file-link_read.c +++ b/level_0/f_file/tests/unit/c/test-file-link_read.c @@ -83,7 +83,6 @@ void test__f_file_link_read__fails(void **state) { void test__f_file_link_read__returns_data_not(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); struct stat statistics; diff --git a/level_0/f_file/tests/unit/c/test-file-link_read_at.c b/level_0/f_file/tests/unit/c/test-file-link_read_at.c index 7e0a064d9..23f2f3b10 100644 --- a/level_0/f_file/tests/unit/c/test-file-link_read_at.c +++ b/level_0/f_file/tests/unit/c/test-file-link_read_at.c @@ -79,8 +79,6 @@ void test__f_file_link_read_at__fails(void **state) { void test__f_file_link_read_at__returns_data_not(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - f_string_dynamic_t buffer = f_string_dynamic_t_initialize; { diff --git a/level_0/f_file/tests/unit/c/test-file-size_by_id.c b/level_0/f_file/tests/unit/c/test-file-size_by_id.c index 16bfd1bab..619e993de 100644 --- a/level_0/f_file/tests/unit/c/test-file-size_by_id.c +++ b/level_0/f_file/tests/unit/c/test-file-size_by_id.c @@ -7,8 +7,6 @@ extern "C" { void test__f_file_size_by_id__fails(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - int errnos[] = { EACCES, EBADF, @@ -74,8 +72,6 @@ void test__f_file_size_by_id__returns_file_closed(void **state) { void test__f_file_size_by_id__works(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - struct stat statistics; memset(&statistics, 0, sizeof(struct stat)); diff --git a/level_0/f_file/tests/unit/c/test-file-stat_by_id.c b/level_0/f_file/tests/unit/c/test-file-stat_by_id.c index 723b2f977..ca8c5a052 100644 --- a/level_0/f_file/tests/unit/c/test-file-stat_by_id.c +++ b/level_0/f_file/tests/unit/c/test-file-stat_by_id.c @@ -7,8 +7,6 @@ extern "C" { void test__f_file_stat_by_id__fails(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - int errnos[] = { EACCES, EBADF, @@ -78,8 +76,6 @@ void test__f_file_stat_by_id__returns_file_closed(void **state) { void test__f_file_stat_by_id__works(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - struct stat statistics; memset(&statistics, 0, sizeof(struct stat)); diff --git a/level_0/f_file/tests/unit/c/test-file-stream_close.c b/level_0/f_file/tests/unit/c/test-file-stream_close.c index e4558236f..aaf8aabe9 100644 --- a/level_0/f_file/tests/unit/c/test-file-stream_close.c +++ b/level_0/f_file/tests/unit/c/test-file-stream_close.c @@ -25,15 +25,6 @@ void test__f_file_stream_close__fails_for_file_descriptor(void **state) { mock_errno_generic, }; - f_status_t status_flushs[] = { - F_file_descriptor, - F_filesystem_quota_block, - F_supported_not, - F_input_output, - F_space_not, - F_supported_not, - }; - f_status_t status_closes[] = { F_file_descriptor, F_filesystem_quota_block, @@ -103,28 +94,6 @@ void test__f_file_stream_close__fails_for_stream(void **state) { mock_errno_generic, }; - f_status_t status_flushs[] = { - F_access_denied, - F_block, - F_file_descriptor, - F_file_overflow, - F_deadlock, - F_socket_not, - F_space_not, - F_buffer, - F_interrupt, - F_parameter, - F_input_output, - F_file_descriptor_max, - F_lock, - F_space_not, - F_file_type_not_directory, - F_prohibited, - F_pipe_not, - F_block, - F_file_synchronize, - }; - f_status_t status_closes[] = { F_access_denied, F_block, diff --git a/level_0/f_file/tests/unit/c/test-file-stream_read.c b/level_0/f_file/tests/unit/c/test-file-stream_read.c index 5016d8b4e..2a8b581db 100644 --- a/level_0/f_file/tests/unit/c/test-file-stream_read.c +++ b/level_0/f_file/tests/unit/c/test-file-stream_read.c @@ -7,8 +7,6 @@ extern "C" { void test__f_file_stream_read__fails(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - int errnos[] = { EAGAIN, EBADF, @@ -106,8 +104,6 @@ void test__f_file_stream_read__returns_file_closed(void **state) { void test__f_file_stream_read__works(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - f_string_dynamic_t buffer = f_string_dynamic_t_initialize; { diff --git a/level_0/f_file/tests/unit/c/test-file-stream_read_block.c b/level_0/f_file/tests/unit/c/test-file-stream_read_block.c index c5da1c0b7..041068254 100644 --- a/level_0/f_file/tests/unit/c/test-file-stream_read_block.c +++ b/level_0/f_file/tests/unit/c/test-file-stream_read_block.c @@ -7,8 +7,6 @@ extern "C" { void test__f_file_stream_read_block__fails(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - int errnos[] = { EAGAIN, EBADF, @@ -105,8 +103,6 @@ void test__f_file_stream_read_block__returns_file_closed(void **state) { void test__f_file_stream_read_block__works(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - f_string_dynamic_t buffer = f_string_dynamic_t_initialize; { diff --git a/level_0/f_file/tests/unit/c/test-file-stream_read_until.c b/level_0/f_file/tests/unit/c/test-file-stream_read_until.c index 9a3384fc3..dbdbfd7a1 100644 --- a/level_0/f_file/tests/unit/c/test-file-stream_read_until.c +++ b/level_0/f_file/tests/unit/c/test-file-stream_read_until.c @@ -7,8 +7,6 @@ extern "C" { void test__f_file_stream_read_until__fails(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - int errnos[] = { EAGAIN, EBADF, @@ -108,8 +106,6 @@ void test__f_file_stream_read_until__returns_file_closed(void **state) { void test__f_file_stream_read_until__works(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - f_string_dynamic_t buffer = f_string_dynamic_t_initialize; { diff --git a/level_0/f_file/tests/unit/c/test-file-stream_reopen.c b/level_0/f_file/tests/unit/c/test-file-stream_reopen.c index 352da5535..e176a4881 100644 --- a/level_0/f_file/tests/unit/c/test-file-stream_reopen.c +++ b/level_0/f_file/tests/unit/c/test-file-stream_reopen.c @@ -91,8 +91,6 @@ void test__f_file_stream_reopen__fails(void **state) { void test__f_file_stream_reopen__returns_data_not(void **state) { - const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4); - { f_file_t file = f_file_t_initialize; diff --git a/level_0/f_file/tests/unit/c/test-file-type.c b/level_0/f_file/tests/unit/c/test-file-type.c index cb57a6036..55e01c348 100644 --- a/level_0/f_file/tests/unit/c/test-file-type.c +++ b/level_0/f_file/tests/unit/c/test-file-type.c @@ -37,12 +37,12 @@ void test__f_file_type__fails(void **state) { for (int i = 0; i < 10; ++i) { - mode_t mode = 0; + int type = 0; will_return(__wrap_lstat, true); will_return(__wrap_lstat, errnos[i]); - const f_status_t status = f_file_type(path, F_false, &mode); + const f_status_t status = f_file_type(path, F_false, &type); assert_int_equal(F_status_set_fine(status), statuss[i]); } // for diff --git a/level_0/f_file/tests/unit/c/test-file-type_at.c b/level_0/f_file/tests/unit/c/test-file-type_at.c index d4eab0093..8ea5a8a12 100644 --- a/level_0/f_file/tests/unit/c/test-file-type_at.c +++ b/level_0/f_file/tests/unit/c/test-file-type_at.c @@ -37,7 +37,7 @@ void test__f_file_type_at__fails(void **state) { for (int i = 0; i < 10; ++i) { - mode_t mode = 0; + int mode = 0; will_return(__wrap_fstatat, true); will_return(__wrap_fstatat, errnos[i]); diff --git a/level_0/f_iki/data/build/settings-tests b/level_0/f_iki/data/build/settings-tests index 43db87337..91d02957a 100644 --- a/level_0/f_iki/data/build/settings-tests +++ b/level_0/f_iki/data/build/settings-tests @@ -49,6 +49,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_iki/tests/unit/c/test-iki-content_is.c b/level_0/f_iki/tests/unit/c/test-iki-content_is.c index ac930493d..bf776514d 100644 --- a/level_0/f_iki/tests/unit/c/test-iki-content_is.c +++ b/level_0/f_iki/tests/unit/c/test-iki-content_is.c @@ -7,8 +7,6 @@ extern "C" { void test__f_iki_content_is__returns_false(void **state) { - f_string_static_t content = f_string_static_t_initialize; - const f_string_static_t contents[] = { macro_f_string_static_t_initialize("'false", 0, 6), macro_f_string_static_t_initialize("false'", 0, 6), @@ -65,8 +63,6 @@ void test__f_iki_content_is__returns_data_not(void **state) { void test__f_iki_content_is__returns_true(void **state) { - f_string_static_t content = f_string_static_t_initialize; - const f_string_static_t contents[] = { macro_f_string_static_t_initialize("works", 0, 5), macro_f_string_static_t_initialize("also works", 0, 10), diff --git a/level_0/f_iki/tests/unit/c/test-iki-content_partial_is.c b/level_0/f_iki/tests/unit/c/test-iki-content_partial_is.c index 5e135bd75..9f3da1cbe 100644 --- a/level_0/f_iki/tests/unit/c/test-iki-content_partial_is.c +++ b/level_0/f_iki/tests/unit/c/test-iki-content_partial_is.c @@ -7,8 +7,6 @@ extern "C" { void test__f_iki_content_partial_is__returns_false(void **state) { - f_string_static_t content = f_string_static_t_initialize; - const f_string_static_t contents[] = { macro_f_string_static_t_initialize("xxxx' falsexxxx", 0, 15), macro_f_string_static_t_initialize("xxxx'falsexxxx", 0, 14), @@ -107,8 +105,6 @@ void test__f_iki_content_partial_is__returns_data_not_stop(void **state) { void test__f_iki_content_partial_is__returns_true(void **state) { - f_string_static_t content = f_string_static_t_initialize; - const f_string_static_t contents[] = { macro_f_string_static_t_initialize("xxxxworksxxxx", 0, 13), macro_f_string_static_t_initialize("xxxxalso worksxxxx", 0, 18), diff --git a/level_0/f_iki/tests/unit/c/test-iki-object_is.c b/level_0/f_iki/tests/unit/c/test-iki-object_is.c index 0abc946d8..d55d8d6d0 100644 --- a/level_0/f_iki/tests/unit/c/test-iki-object_is.c +++ b/level_0/f_iki/tests/unit/c/test-iki-object_is.c @@ -7,8 +7,6 @@ extern "C" { void test__f_iki_object_is__returns_false(void **state) { - f_string_static_t object = f_string_static_t_initialize; - const f_string_static_t objects[] = { macro_f_string_static_t_initialize("fa lse", 0, 6), macro_f_string_static_t_initialize("filse@", 0, 6), @@ -45,8 +43,6 @@ void test__f_iki_object_is__returns_data_not(void **state) { void test__f_iki_object_is__returns_true(void **state) { - f_string_static_t object = f_string_static_t_initialize; - const f_string_static_t objects[] = { macro_f_string_static_t_initialize("works", 0, 5), macro_f_string_static_t_initialize("wor_ks", 0, 6), diff --git a/level_0/f_iki/tests/unit/c/test-iki-object_partial_is.c b/level_0/f_iki/tests/unit/c/test-iki-object_partial_is.c index 63a39c61c..a06d26622 100644 --- a/level_0/f_iki/tests/unit/c/test-iki-object_partial_is.c +++ b/level_0/f_iki/tests/unit/c/test-iki-object_partial_is.c @@ -7,8 +7,6 @@ extern "C" { void test__f_iki_object_partial_is__returns_false(void **state) { - f_string_static_t object = f_string_static_t_initialize; - const f_string_static_t objects[] = { macro_f_string_static_t_initialize("xxxxfa lsexxxx", 0, 14), macro_f_string_static_t_initialize("xxxxfalse@xxxx", 0, 14), @@ -86,8 +84,6 @@ void test__f_iki_object_partial_is__returns_data_not_stop(void **state) { void test__f_iki_object_partial_is__returns_true(void **state) { - f_string_static_t object = f_string_static_t_initialize; - const f_string_static_t objects[] = { macro_f_string_static_t_initialize("xxxxworksxxxx", 0, 13), macro_f_string_static_t_initialize("xxxxwor_ksxxxx", 0, 14), diff --git a/level_0/f_memory/data/build/settings-tests b/level_0/f_memory/data/build/settings-tests index 68024e94f..d5a2f04f6 100644 --- a/level_0/f_memory/data/build/settings-tests +++ b/level_0/f_memory/data/build/settings-tests @@ -45,6 +45,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_string/data/build/settings-tests b/level_0/f_string/data/build/settings-tests index c9d200cfe..134eea519 100644 --- a/level_0/f_string/data/build/settings-tests +++ b/level_0/f_string/data/build/settings-tests @@ -70,6 +70,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c index 6b55e4685..31cee0ec9 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c @@ -7,7 +7,6 @@ extern "C" { void test__f_string_dynamicss_append_all__works(void **state) { - const int length = 5; const int length_inner = 2; const int length_outer = 2; f_string_dynamicss_t source = f_string_dynamicss_t_initialize; @@ -26,7 +25,6 @@ void test__f_string_dynamicss_append_all__works(void **state) { assert_int_equal(source.size, length_outer); f_array_length_t i = 0; - f_array_length_t j = 0; for (; source.used < length_outer; ++source.used) { diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_append.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_append.c index 8fb8580a9..e15e43d33 100644 --- a/level_0/f_string/tests/unit/c/test-string-map_multiss_append.c +++ b/level_0/f_string/tests/unit/c/test-string-map_multiss_append.c @@ -8,7 +8,6 @@ extern "C" { void test__f_string_map_multiss_append__works(void **state) { const int length_values = 2; - const int length_values_set = 2; const int length_inner = 2; f_string_map_multis_t source = f_string_map_multis_t_initialize; f_string_map_multiss_t destination = f_string_map_multiss_t_initialize; diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c index cdec36bdc..38cfa3d04 100644 --- a/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c @@ -8,7 +8,6 @@ extern "C" { void test__f_string_map_multiss_append_all__works(void **state) { const int length_values = 2; - const int length_values_set = 2; const int length_inner = 2; const int length_outer = 2; f_string_map_multiss_t source = f_string_map_multiss_t_initialize; @@ -42,7 +41,6 @@ void test__f_string_map_multiss_append_all__works(void **state) { assert_int_equal(source.size, length_outer); f_array_length_t i = 0; - f_array_length_t j = 0; for (; source.used < length_outer; ++source.used) { diff --git a/level_0/f_string/tests/unit/c/test-string-maps_append_all.c b/level_0/f_string/tests/unit/c/test-string-maps_append_all.c index d985f05da..6ed8a3b21 100644 --- a/level_0/f_string/tests/unit/c/test-string-maps_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-maps_append_all.c @@ -7,7 +7,6 @@ extern "C" { void test__f_string_maps_append_all__works(void **state) { - const int length = 5; const int length_inner = 2; f_string_maps_t source = f_string_maps_t_initialize; f_string_maps_t destination = f_string_maps_t_initialize; diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_append_all.c b/level_0/f_string/tests/unit/c/test-string-mapss_append_all.c index d1639cc40..41b2f2453 100644 --- a/level_0/f_string/tests/unit/c/test-string-mapss_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-mapss_append_all.c @@ -7,7 +7,6 @@ extern "C" { void test__f_string_mapss_append_all__works(void **state) { - const int length = 5; const int length_inner = 2; const int length_outer = 2; f_string_mapss_t source = f_string_mapss_t_initialize; @@ -31,7 +30,6 @@ void test__f_string_mapss_append_all__works(void **state) { assert_int_equal(source.size, length_outer); f_array_length_t i = 0; - f_array_length_t j = 0; for (; source.used < length_outer; ++source.used) { diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c b/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c index 5d761c5b6..29c67a4bd 100644 --- a/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c @@ -7,7 +7,6 @@ extern "C" { void test__f_string_quantitys_append_all__works(void **state) { - const int length = 5; const int length_sources = 2; f_string_quantity_t sources_array[] = { diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_append.c b/level_0/f_string/tests/unit/c/test-string-ranges_append.c index b126fb030..b1d702347 100644 --- a/level_0/f_string/tests/unit/c/test-string-ranges_append.c +++ b/level_0/f_string/tests/unit/c/test-string-ranges_append.c @@ -7,7 +7,6 @@ extern "C" { void test__f_string_ranges_append__works(void **state) { - const f_array_length_t length = 5; const f_string_range_t source = macro_f_string_range_t_initialize(1, 2); f_string_ranges_t destination = f_string_ranges_t_initialize; diff --git a/level_0/f_type_array/data/build/settings-tests b/level_0/f_type_array/data/build/settings-tests index 2ef63b2ed..dcad9c51a 100644 --- a/level_0/f_type_array/data/build/settings-tests +++ b/level_0/f_type_array/data/build/settings-tests @@ -75,6 +75,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append.c b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append.c index 53d7abdbd..5235bc15e 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append.c @@ -8,7 +8,6 @@ extern "C" { void test__f_type_array_array_lengthss_append__works(void **state) { const int length = 5; - const int length_inner = 2; f_array_lengths_t source = f_array_lengths_t_initialize; f_array_lengthss_t destination = f_array_lengthss_t_initialize; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c index e208d80b1..880420302 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c @@ -7,7 +7,6 @@ extern "C" { void test__f_type_array_fll_ids_append__works(void **state) { - const int length = 5; const f_fll_id_t source = { .name = "test", .type = 1, .used = 4 }; f_fll_ids_t destination = f_fll_ids_t_initialize; diff --git a/level_0/f_utf/data/build/settings-tests b/level_0/f_utf/data/build/settings-tests index 091146605..19dbd75b3 100644 --- a/level_0/f_utf/data/build/settings-tests +++ b/level_0/f_utf/data/build/settings-tests @@ -68,6 +68,6 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses -flags-test -fstack-protector +flags-test -fstack-protector -Wall flags_program -fPIE diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.c index 66b2b6a57..cdfc1af54 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.c @@ -7,7 +7,6 @@ extern "C" { void test__f_utf_dynamicss_append_all__works(void **state) { - const int length = 5; const int length_inner = 2; const int length_outer = 2; f_utf_string_dynamicss_t source = f_utf_string_dynamicss_t_initialize; @@ -26,7 +25,6 @@ void test__f_utf_dynamicss_append_all__works(void **state) { assert_int_equal(source.size, length_outer); f_array_length_t i = 0; - f_array_length_t j = 0; for (; source.used < length_outer; ++source.used) { diff --git a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.c b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.c index 1c5fdd725..08cb2ec3a 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.c @@ -8,7 +8,6 @@ extern "C" { void test__f_utf_map_multiss_append__works(void **state) { const int length_values = 2; - const int length_values_set = 2; const int length_inner = 2; f_utf_string_map_multis_t source = f_utf_string_map_multis_t_initialize; f_utf_string_map_multiss_t destination = f_utf_string_map_multiss_t_initialize; diff --git a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.c index 8e596b6a3..a729aec6b 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.c @@ -8,7 +8,6 @@ extern "C" { void test__f_utf_map_multiss_append_all__works(void **state) { const int length_values = 2; - const int length_values_set = 2; const int length_inner = 2; const int length_outer = 2; f_utf_string_map_multiss_t source = f_utf_string_map_multiss_t_initialize; @@ -42,7 +41,6 @@ void test__f_utf_map_multiss_append_all__works(void **state) { assert_int_equal(source.size, length_outer); f_array_length_t i = 0; - f_array_length_t j = 0; for (; source.used < length_outer; ++source.used) { diff --git a/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.c index c168c5995..12ccf8a3a 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.c @@ -7,7 +7,6 @@ extern "C" { void test__f_utf_maps_append_all__works(void **state) { - const int length = 5; const int length_inner = 2; f_utf_string_maps_t source = f_utf_string_maps_t_initialize; f_utf_string_maps_t destination = f_utf_string_maps_t_initialize; diff --git a/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.c index 0205c2dd5..f7f1e1104 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.c @@ -7,7 +7,6 @@ extern "C" { void test__f_utf_mapss_append_all__works(void **state) { - const int length = 5; const int length_inner = 2; const int length_outer = 2; f_utf_string_mapss_t source = f_utf_string_mapss_t_initialize; @@ -31,7 +30,6 @@ void test__f_utf_mapss_append_all__works(void **state) { assert_int_equal(source.size, length_outer); f_array_length_t i = 0; - f_array_length_t j = 0; for (; source.used < length_outer; ++source.used) {