From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] overlay: Fix compiler warning when compiling with meson
Date: Tue, 21 Nov 2017 16:43:43 +0000 [thread overview]
Message-ID: <dab9341e-c90d-cb20-058f-7db6633e9f94@linux.intel.com> (raw)
In-Reply-To: <20171121132650.16818-1-maarten.lankhorst@linux.intel.com>
On 21/11/2017 13:26, Maarten Lankhorst wrote:
> [1/316] Compiling C object 'overlay/intel-gpu-overlay@exe/overlay.c.o'.
> ../overlay/overlay.c: In function ‘show_gem_objects’:
> ../overlay/overlay.c:798:31: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 160 [-Wformat-truncation=]
> snprintf(buf, sizeof(buf), "%s %ldMB, %ld objects",
> ^~
> ../overlay/overlay.c:798:30: note: using the range [-9223372036854775808, 9223372036854775807] for directive argument
> snprintf(buf, sizeof(buf), "%s %ldMB, %ld objects",
> ^~~~~~~~~~~~~~~~~~~~~~~
> ../overlay/overlay.c:798:30: note: using the range [-9223372036854775808, 9223372036854775807] for directive argument
> ../overlay/overlay.c:798:3: note: ‘snprintf’ output between 16 and 309 bytes into a destination of size 160
> snprintf(buf, sizeof(buf), "%s %ldMB, %ld objects",
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> comm->name, comm->bytes >> 20, comm->count);
>
> Might as well give it the 309 bytes it wants, plus on more. :-)
My bad for not pushing my fix for the same from a few weeks back. a) I
was hoping the whole series could go in one, and b) patchwork did not
spot the r-b reply I got.
Regards,
Tvrtko
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> overlay/overlay.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/overlay/overlay.c b/overlay/overlay.c
> index b30f7a1d66da..4804f813554a 100644
> --- a/overlay/overlay.c
> +++ b/overlay/overlay.c
> @@ -740,7 +740,7 @@ static void init_gem_objects(struct overlay_context *ctx,
> static void show_gem_objects(struct overlay_context *ctx, struct overlay_gem_objects *go)
> {
> struct gem_objects_comm *comm;
> - char buf[160];
> + char buf[310];
> cairo_pattern_t *linear;
> int x, y, y1, y2;
>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2017-11-21 16:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 13:26 [PATCH i-g-t] overlay: Fix compiler warning when compiling with meson Maarten Lankhorst
2017-11-21 13:32 ` Chris Wilson
2017-11-21 14:06 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-21 16:32 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-11-21 16:43 ` Tvrtko Ursulin [this message]
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=dab9341e-c90d-cb20-058f-7db6633e9f94@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.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