From: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> To: Petri Latvala <petri.latvala@intel.com>, Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Subject: [PATCH i-g-t 3/3] Move declaration to the top of the code Date: Tue, 29 May 2018 21:47:13 -0300 [thread overview] Message-ID: <491079aa8b1be2e1f6f79aee7b08aa5ca1d42098.1527639529.git.rodrigosiqueiramelo@gmail.com> (raw) In-Reply-To: <cover.1527639529.git.rodrigosiqueiramelo@gmail.com> This patch fix the following gcc warnings: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] [..] igt_color_encoding.c:45:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] [..] igt_color_encoding.c: In function ‘ycbcr_to_rgb_matrix’: igt_color_encoding.c:72:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] [..] Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> --- lib/igt_color_encoding.c | 16 ++++++---------- tests/kms_frontbuffer_tracking.c | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/igt_color_encoding.c b/lib/igt_color_encoding.c index b1648a74..1a89bb46 100644 --- a/lib/igt_color_encoding.c +++ b/lib/igt_color_encoding.c @@ -36,11 +36,9 @@ static const struct color_encoding color_encodings[IGT_NUM_COLOR_ENCODINGS] = { static struct igt_mat4 rgb_to_ycbcr_matrix(const struct color_encoding *e) { - float kr, kg, kb; - - kr = e->kr; - kb = e->kb; - kg = 1.0f - kr - kb; + float kr = e->kr; + float kb = e->kb; + float kg = 1.0f - kr - kb; struct igt_mat4 ret = { .d[0 * 4 + 0] = kr, @@ -63,11 +61,9 @@ static struct igt_mat4 rgb_to_ycbcr_matrix(const struct color_encoding *e) static struct igt_mat4 ycbcr_to_rgb_matrix(const struct color_encoding *e) { - float kr, kg, kb; - - kr = e->kr; - kb = e->kb; - kg = 1.0f - kr - kb; + float kr = e->kr; + float kb = e->kb; + float kg = 1.0f - kr - kb; struct igt_mat4 ret = { .d[0 * 4 + 0] = 1.0f, diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 8754cc46..dbb8ba62 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1770,8 +1770,8 @@ static void do_status_assertions(int flags) static void __do_assertions(const struct test_mode *t, int flags, int line) { - flags = adjust_assertion_flags(t, flags); bool mandatory_sink_crc = t->feature & FEATURE_PSR; + flags = adjust_assertion_flags(t, flags); igt_debug("checking asserts in line %i\n", line); -- 2.17.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> To: Petri Latvala <petri.latvala@intel.com>, Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: igt-dev@lists.freedesktop.org, gustavo@padovan.org, intel-gfx@lists.freedesktop.org Subject: [igt-dev] [PATCH i-g-t 3/3] Move declaration to the top of the code Date: Tue, 29 May 2018 21:47:13 -0300 [thread overview] Message-ID: <491079aa8b1be2e1f6f79aee7b08aa5ca1d42098.1527639529.git.rodrigosiqueiramelo@gmail.com> (raw) In-Reply-To: <cover.1527639529.git.rodrigosiqueiramelo@gmail.com> This patch fix the following gcc warnings: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] [..] igt_color_encoding.c:45:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] [..] igt_color_encoding.c: In function ‘ycbcr_to_rgb_matrix’: igt_color_encoding.c:72:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] [..] Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> --- lib/igt_color_encoding.c | 16 ++++++---------- tests/kms_frontbuffer_tracking.c | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/igt_color_encoding.c b/lib/igt_color_encoding.c index b1648a74..1a89bb46 100644 --- a/lib/igt_color_encoding.c +++ b/lib/igt_color_encoding.c @@ -36,11 +36,9 @@ static const struct color_encoding color_encodings[IGT_NUM_COLOR_ENCODINGS] = { static struct igt_mat4 rgb_to_ycbcr_matrix(const struct color_encoding *e) { - float kr, kg, kb; - - kr = e->kr; - kb = e->kb; - kg = 1.0f - kr - kb; + float kr = e->kr; + float kb = e->kb; + float kg = 1.0f - kr - kb; struct igt_mat4 ret = { .d[0 * 4 + 0] = kr, @@ -63,11 +61,9 @@ static struct igt_mat4 rgb_to_ycbcr_matrix(const struct color_encoding *e) static struct igt_mat4 ycbcr_to_rgb_matrix(const struct color_encoding *e) { - float kr, kg, kb; - - kr = e->kr; - kb = e->kb; - kg = 1.0f - kr - kb; + float kr = e->kr; + float kb = e->kb; + float kg = 1.0f - kr - kb; struct igt_mat4 ret = { .d[0 * 4 + 0] = 1.0f, diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 8754cc46..dbb8ba62 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1770,8 +1770,8 @@ static void do_status_assertions(int flags) static void __do_assertions(const struct test_mode *t, int flags, int line) { - flags = adjust_assertion_flags(t, flags); bool mandatory_sink_crc = t->feature & FEATURE_PSR; + flags = adjust_assertion_flags(t, flags); igt_debug("checking asserts in line %i\n", line); -- 2.17.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-05-30 0:47 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-30 0:46 [PATCH i-g-t 0/3] Fix some GCC warnings Rodrigo Siqueira 2018-05-30 0:46 ` [igt-dev] " Rodrigo Siqueira 2018-05-30 0:46 ` [PATCH i-g-t 1/3] Avoid truncate string in __igt_lsof_fds Rodrigo Siqueira 2018-05-30 0:46 ` [igt-dev] " Rodrigo Siqueira 2018-06-04 10:40 ` Arkadiusz Hiler 2018-06-04 10:40 ` [Intel-gfx] " Arkadiusz Hiler 2018-06-05 1:45 ` Rodrigo Siqueira 2018-06-05 1:45 ` [igt-dev] " Rodrigo Siqueira 2018-05-30 0:46 ` [PATCH i-g-t 2/3] Remove extra '\0' in strncpy in igt_save_module_param Rodrigo Siqueira 2018-05-30 0:46 ` [igt-dev] " Rodrigo Siqueira 2018-06-04 11:04 ` Arkadiusz Hiler 2018-06-04 11:04 ` [Intel-gfx] " Arkadiusz Hiler 2018-05-30 0:47 ` Rodrigo Siqueira [this message] 2018-05-30 0:47 ` [igt-dev] [PATCH i-g-t 3/3] Move declaration to the top of the code Rodrigo Siqueira 2018-06-04 10:54 ` Arkadiusz Hiler 2018-06-04 10:54 ` [igt-dev] " Arkadiusz Hiler 2018-05-30 2:25 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix some GCC warnings Patchwork 2018-05-30 4:26 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork 2018-06-04 8:39 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork 2018-06-04 9:54 ` [igt-dev] ✓ Fi.CI.IGT: " 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=491079aa8b1be2e1f6f79aee7b08aa5ca1d42098.1527639529.git.rodrigosiqueiramelo@gmail.com \ --to=rodrigosiqueiramelo@gmail.com \ --cc=arkadiusz.hiler@intel.com \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=petri.latvala@intel.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.