diff --git a/helpers/check-vulkan.cpp b/helpers/check-vulkan.cpp index fa515e6853953bd9074bfa74c5ef3dad9f1ab71b..32e49c3dbb53a9859445f58b88e3160e5f950a9d 100644 --- a/helpers/check-vulkan.cpp +++ b/helpers/check-vulkan.cpp @@ -653,7 +653,7 @@ private: renderPassInfo.renderArea.offset = {0, 0}; renderPassInfo.renderArea.extent = swapChainExtent; - VkClearValue clearColor = {0.0f, 0.0f, 0.0f, 1.0f}; + VkClearValue clearColor = { { {0.0f, 0.0f, 0.0f, 1.0f} } }; renderPassInfo.clearValueCount = 1; renderPassInfo.pClearValues = &clearColor; diff --git a/steam-runtime-tools/graphics.c b/steam-runtime-tools/graphics.c index cc7c42e2e760c95eb287fbe445815613c9250a2f..196dbacd3e5ed2b1a78840dc28ebe9e98495c910 100644 --- a/steam-runtime-tools/graphics.c +++ b/steam-runtime-tools/graphics.c @@ -688,10 +688,8 @@ _srt_check_graphics (const char *helpers_path, gboolean parse_wflinfo = (rendering_interface != SRT_RENDERING_INTERFACE_VULKAN); g_return_val_if_fail (details_out == NULL || *details_out == NULL, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); - g_return_val_if_fail (window_system >= 0, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); - g_return_val_if_fail (window_system < SRT_N_WINDOW_SYSTEMS, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); - g_return_val_if_fail (rendering_interface >= 0, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); - g_return_val_if_fail (rendering_interface < SRT_N_RENDERING_INTERFACES, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); + g_return_val_if_fail (((unsigned) window_system) < SRT_N_WINDOW_SYSTEMS, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); + g_return_val_if_fail (((unsigned) rendering_interface) < SRT_N_RENDERING_INTERFACES, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); g_return_val_if_fail (_srt_check_not_setuid (), SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); GPtrArray *argv = _argv_for_graphics_test (helpers_path, diff --git a/steam-runtime-tools/system-info.c b/steam-runtime-tools/system-info.c index 2f73fc66927853397a4c320d3d20e41d4379e83c..ae2144d218b4577faf222b1e283b01c85a89f1c5 100644 --- a/steam-runtime-tools/system-info.c +++ b/steam-runtime-tools/system-info.c @@ -1371,10 +1371,8 @@ srt_system_info_check_graphics (SrtSystemInfo *self, g_return_val_if_fail (multiarch_tuple != NULL, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); g_return_val_if_fail (details_out == NULL || *details_out == NULL, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); - g_return_val_if_fail (window_system >= 0, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); - g_return_val_if_fail (window_system < SRT_N_WINDOW_SYSTEMS, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); - g_return_val_if_fail (rendering_interface >= 0, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); - g_return_val_if_fail (rendering_interface < SRT_N_RENDERING_INTERFACES, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); + g_return_val_if_fail (((unsigned) window_system) < SRT_N_WINDOW_SYSTEMS, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); + g_return_val_if_fail (((unsigned) rendering_interface) < SRT_N_RENDERING_INTERFACES, SRT_GRAPHICS_ISSUES_INTERNAL_ERROR); abi = ensure_abi (self, multiarch_tuple); diff --git a/tests/fake-home.c b/tests/fake-home.c index e5887212989de5757bd4a149e0fde579ad9f17fc..7aa6e7c7ea554c30c4637ee2221e9b9816e5a29e 100644 --- a/tests/fake-home.c +++ b/tests/fake-home.c @@ -76,7 +76,7 @@ gboolean fake_home_create_structure (FakeHome *f) { gboolean ret = FALSE; - GFile *symlink = NULL; + GFile *symlink_gfile = NULL; gchar *dot_steam = NULL; gchar *scripts = NULL; gchar *run = NULL; @@ -198,18 +198,18 @@ fake_home_create_structure (FakeHome *f) { if (dot_steam_root == NULL) dot_steam_root = g_build_filename (dot_steam, "root", NULL); - symlink = g_file_new_for_path (dot_steam_root); + symlink_gfile = g_file_new_for_path (dot_steam_root); - g_file_make_symbolic_link (symlink, f->steam_install, NULL, &error); - g_object_unref (symlink); + g_file_make_symbolic_link (symlink_gfile, f->steam_install, NULL, &error); + g_object_unref (symlink_gfile); g_assert_no_error (error); dot_steam_bin32 = g_build_filename (dot_steam, "bin32", NULL); - symlink = g_file_new_for_path (dot_steam_bin32); + symlink_gfile = g_file_new_for_path (dot_steam_bin32); ubuntu12_32 = g_build_filename (f->steam_install, "ubuntu12_32", NULL); - g_file_make_symbolic_link (symlink, ubuntu12_32, NULL, &error); - g_object_unref (symlink); + g_file_make_symbolic_link (symlink_gfile, ubuntu12_32, NULL, &error); + g_object_unref (symlink_gfile); g_assert_no_error (error); } @@ -217,10 +217,10 @@ fake_home_create_structure (FakeHome *f) { if (dot_steam_steam == NULL) dot_steam_steam = g_build_filename (dot_steam, "steam", NULL); - symlink = g_file_new_for_path (dot_steam_steam); + symlink_gfile = g_file_new_for_path (dot_steam_steam); - g_file_make_symbolic_link (symlink, f->steam_data, NULL, &error); - g_object_unref (symlink); + g_file_make_symbolic_link (symlink_gfile, f->steam_data, NULL, &error); + g_object_unref (symlink_gfile); if (f->has_debian_bug_916303) { g_error_free (error); diff --git a/tests/system-info.c b/tests/system-info.c index cb330f5152d4bc126bc215cfb1183629acc87bbb..7a375b2477658332ad487d6474b49ec0c45a8787 100644 --- a/tests/system-info.c +++ b/tests/system-info.c @@ -1054,7 +1054,7 @@ runtime_unexpected_location (Fixture *f, gchar *ld_path = NULL; gchar *env_path = NULL; gchar **parts = NULL; - GFile *symlink = NULL; + GFile *symlink_gfile = NULL; GError *error = NULL; FakeHome *fake_home; @@ -1071,13 +1071,13 @@ runtime_unexpected_location (Fixture *f, /* Create a new homedir/.steam/steam symlink that doesn't point to * the expected steam runtime path. */ - symlink = g_file_new_for_path (dot_steam_root); - g_file_make_symbolic_link (symlink, fake_home->pinned_64, NULL, &error); + symlink_gfile = g_file_new_for_path (dot_steam_root); + g_file_make_symbolic_link (symlink_gfile, fake_home->pinned_64, NULL, &error); g_assert_no_error (error); srt_system_info_set_environ (info, fake_home->env); issues = srt_system_info_get_runtime_issues (info); g_assert_cmpint (issues, ==, SRT_RUNTIME_ISSUES_UNEXPECTED_LOCATION); - g_object_unref (symlink); + g_object_unref (symlink_gfile); /* Move the steam-runtime to another location called "my-runtime" and * adjust all the environment variables accordingly. */ @@ -1094,8 +1094,8 @@ runtime_unexpected_location (Fixture *f, g_rename (fake_home->runtime, my_runtime); g_remove (dot_steam_root); - symlink = g_file_new_for_path (dot_steam_root); - g_file_make_symbolic_link (symlink, my_runtime, NULL, &error); + symlink_gfile = g_file_new_for_path (dot_steam_root); + g_file_make_symbolic_link (symlink_gfile, my_runtime, NULL, &error); g_assert_no_error (error); fake_home->env = g_environ_setenv (fake_home->env, "LD_LIBRARY_PATH", ld_path, TRUE); fake_home->env = g_environ_setenv (fake_home->env, "STEAM_RUNTIME", my_runtime, TRUE); @@ -1106,7 +1106,7 @@ runtime_unexpected_location (Fixture *f, g_assert_cmpint (issues, ==, SRT_RUNTIME_ISSUES_UNEXPECTED_LOCATION); fake_home_clean_up (fake_home); - g_object_unref (symlink); + g_object_unref (symlink_gfile); g_object_unref (info); g_free (dot_steam_root); g_free (my_runtime); @@ -1127,7 +1127,7 @@ steam_symlink (Fixture *f, gchar *dot_steam_bin32 = NULL; gchar *installation_path = NULL; gchar *ubuntu12_32 = NULL; - GFile *symlink = NULL; + GFile *symlink_gfile = NULL; GError *error = NULL; FakeHome *fake_home; @@ -1150,8 +1150,8 @@ steam_symlink (Fixture *f, /* Remove homedir/.steam/root symlink and create homedir/.steam/bin32 symlink. */ g_remove (dot_steam_root); g_remove (dot_steam_bin32); - symlink = g_file_new_for_path (dot_steam_bin32); - g_file_make_symbolic_link (symlink, ubuntu12_32, NULL, &error); + symlink_gfile = g_file_new_for_path (dot_steam_bin32); + g_file_make_symbolic_link (symlink_gfile, ubuntu12_32, NULL, &error); g_assert_no_error (error); srt_system_info_set_environ (info, fake_home->env); issues = srt_system_info_get_steam_issues (info); @@ -1177,7 +1177,7 @@ steam_symlink (Fixture *f, g_assert_cmpstr (installation_path, ==, NULL); fake_home_clean_up (fake_home); - g_object_unref (symlink); + g_object_unref (symlink_gfile); g_object_unref (info); g_free (data_home); g_free (dot_steam_steam); @@ -1871,7 +1871,7 @@ pinned_libraries (Fixture *f, gchar *has_pins = NULL; gchar **values = NULL; gchar **messages = NULL; - GFile *symlink = NULL; + GFile *symlink_gfile = NULL; gboolean seen_pins; gsize i; GError *error = NULL; @@ -1884,18 +1884,18 @@ pinned_libraries (Fixture *f, start = g_build_filename (fake_home->pinned_32, "libcurl.so.3", NULL); target1 = g_build_filename (fake_home->pinned_32, "libcurl.so.4", NULL); - symlink = g_file_new_for_path (start); + symlink_gfile = g_file_new_for_path (start); - g_file_make_symbolic_link (symlink, target1, NULL, &error); - g_object_unref (symlink); + g_file_make_symbolic_link (symlink_gfile, target1, NULL, &error); + g_object_unref (symlink_gfile); g_assert_no_error (error); target2 = g_build_filename (fake_home->i386_usr_lib_i386, "libcurl.so.4.2.0", NULL); g_assert_cmpint (g_creat (target2, 0755), >, -1); - symlink = g_file_new_for_path (target1); + symlink_gfile = g_file_new_for_path (target1); - g_file_make_symbolic_link (symlink, target2, NULL, &error); - g_object_unref (symlink); + g_file_make_symbolic_link (symlink_gfile, target2, NULL, &error); + g_object_unref (symlink_gfile); g_assert_no_error (error); has_pins = g_build_filename (fake_home->pinned_32, "has_pins", NULL); @@ -1950,18 +1950,18 @@ pinned_libraries (Fixture *f, srt_system_info_set_environ (info, fake_home->env); start = g_build_filename (fake_home->pinned_64, "libcurl.so.3", NULL); target1 = g_build_filename (fake_home->pinned_64, "libcurl.so.4", NULL); - symlink = g_file_new_for_path (start); + symlink_gfile = g_file_new_for_path (start); - g_file_make_symbolic_link (symlink, target1, NULL, &error); - g_object_unref (symlink); + g_file_make_symbolic_link (symlink_gfile, target1, NULL, &error); + g_object_unref (symlink_gfile); g_assert_no_error (error); target2 = g_build_filename (fake_home->amd64_usr_lib_64, "libcurl.so.4.2.0", NULL); g_assert_cmpint (g_creat (target2, 0755), >, -1); - symlink = g_file_new_for_path (target1); + symlink_gfile = g_file_new_for_path (target1); - g_file_make_symbolic_link (symlink, target2, NULL, &error); - g_object_unref (symlink); + g_file_make_symbolic_link (symlink_gfile, target2, NULL, &error); + g_object_unref (symlink_gfile); g_assert_no_error (error); has_pins = g_build_filename (fake_home->pinned_64, "has_pins", NULL);