From: Carlos Santa <carlos.santa@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH v2] tests: use an empty brace initializer
Date: Thu, 23 Jul 2020 16:54:58 -0700 [thread overview]
Message-ID: <20200723235458.43684-1-carlos.santa@intel.com> (raw)
In some sandboxes the toolchain complains about missing
braces around initializer, however, using an empty
initializer is enough to shut out the compiler.
../tests/kms_plane_cursor.c: In function '__real_main_302':
../tests/kms_plane_cursor.c:305:2 error: missing braces around
initializer [-Werror=missing-braces]
data_t data = { 0 };
v2:
Use an empty initializer { } instead of { 0 } <Petri, Latvala>
Signed-off-by: Carlos Santa <carlos.santa@intel.com>
---
tests/amdgpu/amd_abm.c | 2 +-
tests/kms_hdr.c | 2 +-
tests/kms_plane_cursor.c | 2 +-
tests/kms_vrr.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/amdgpu/amd_abm.c b/tests/amdgpu/amd_abm.c
index 741564628642..0505f17e46f9 100644
--- a/tests/amdgpu/amd_abm.c
+++ b/tests/amdgpu/amd_abm.c
@@ -299,7 +299,7 @@ static void abm_gradual(data_t *data)
igt_main
{
- data_t data = { 0 };
+ data_t data = {};
enum pipe pipe;
igt_output_t *output;
diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
index 0574d5ff5217..aa7e685b864b 100644
--- a/tests/kms_hdr.c
+++ b/tests/kms_hdr.c
@@ -633,7 +633,7 @@ static void test_hdr(data_t *data, const char *test_name, uint32_t flags)
igt_main
{
- data_t data = { 0 };
+ data_t data = {};
igt_fixture {
data.fd = drm_open_driver_master(DRIVER_AMDGPU | DRIVER_INTEL);
diff --git a/tests/kms_plane_cursor.c b/tests/kms_plane_cursor.c
index f7d50484dae1..f6766d368965 100644
--- a/tests/kms_plane_cursor.c
+++ b/tests/kms_plane_cursor.c
@@ -302,7 +302,7 @@ static void test_cursor_viewport(data_t *data, int size, enum pipe pipe_id)
igt_main
{
static const int cursor_sizes[] = { 64, 128, 256 };
- data_t data = { 0 };
+ data_t data = {};
enum pipe pipe;
int i;
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 559ef2030930..a0db90006d00 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -390,7 +390,7 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
igt_main
{
- data_t data = { 0 };
+ data_t data = {};
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_ANY);
--
2.26.2
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2020-07-23 23:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 23:54 Carlos Santa [this message]
2020-07-24 0:41 ` [igt-dev] ✗ GitLab.Pipeline: warning for tests: use an empty brace initializer Patchwork
2020-07-24 0:57 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-07-24 7:08 ` [igt-dev] [PATCH v2] " Petri Latvala
2020-08-06 8:43 ` Petri Latvala
2020-07-24 8:38 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200723235458.43684-1-carlos.santa@intel.com \
--to=carlos.santa@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox