public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tools/i915-perf: workaround overzelous compiler warnings
Date: Thu, 20 Feb 2020 14:51:52 +0200	[thread overview]
Message-ID: <20200220125152.1188880-1-lionel.g.landwerlin@intel.com> (raw)

Give me a break :)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 tools/i915-perf/i915_perf_control.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/i915-perf/i915_perf_control.c b/tools/i915-perf/i915_perf_control.c
index a8d0d30f..dcbc2f59 100644
--- a/tools/i915-perf/i915_perf_control.c
+++ b/tools/i915-perf/i915_perf_control.c
@@ -95,10 +95,12 @@ main(int argc, char *argv[])
 				struct recorder_command_base base;
 				struct recorder_command_dump dump;
 			} *data = malloc(total_len);
+			char *path = (char *) data->dump.path;
 
 			data->base.command = RECORDER_COMMAND_DUMP;
 			data->base.size = total_len;
-			snprintf((char *) data->dump.path, strlen(dump_file) + 1, "%s", dump_file);
+			snprintf(path, strlen(dump_file) + 1, "%s", dump_file);
+
 
 			fwrite(data, total_len, 1, command_fifo_file);
 		} else {
@@ -109,10 +111,11 @@ main(int argc, char *argv[])
 				struct recorder_command_base base;
 				struct recorder_command_dump dump;
 			} *data = malloc(total_len);
+			char *path = (char *) data->dump.path;
 
 			data->base.command = RECORDER_COMMAND_DUMP;
 			data->base.size = total_len;
-			snprintf((char *) data->dump.path, path_len, "%s/%s", cwd, dump_file);
+			snprintf(path, path_len, "%s/%s", cwd, dump_file);
 
 			fwrite(data, total_len, 1, command_fifo_file);
 		}
-- 
2.25.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2020-02-20 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 12:51 Lionel Landwerlin [this message]
2020-02-20 12:58 ` [igt-dev] [PATCH i-g-t] tools/i915-perf: workaround overzelous compiler warnings Petri Latvala
2020-02-20 13:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-02-22 15:40 ` [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=20200220125152.1188880-1-lionel.g.landwerlin@intel.com \
    --to=lionel.g.landwerlin@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