From: Petri Latvala <petri.latvala@intel.com>
To: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tools/i915-perf: workaround overzelous compiler warnings
Date: Thu, 20 Feb 2020 14:58:39 +0200 [thread overview]
Message-ID: <20200220125839.GY25209@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20200220125152.1188880-1-lionel.g.landwerlin@intel.com>
On Thu, Feb 20, 2020 at 02:51:52PM +0200, Lionel Landwerlin wrote:
> 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);
> +
Same warning still. My compiler is clever enough to see that even with
another pointer indirection, the area pointed at is an array of 0
elements.
--
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-02-20 12:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 12:51 [igt-dev] [PATCH i-g-t] tools/i915-perf: workaround overzelous compiler warnings Lionel Landwerlin
2020-02-20 12:58 ` Petri Latvala [this message]
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=20200220125839.GY25209@platvala-desk.ger.corp.intel.com \
--to=petri.latvala@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lionel.g.landwerlin@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: 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