All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/5] tools/intel_watermark: Silence gcc7 snprintf() warnings
@ 2017-11-21 18:49 Ville Syrjala
  2017-11-21 18:49 ` [PATCH i-g-t 2/5] tools/intel_watermark: Refactor reg name stuff Ville Syrjala
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Ville Syrjala @ 2017-11-21 18:49 UTC (permalink / raw)
  To: intel-gfx; +Cc: Dhinakaran Pandiyan

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Bump the snprintf() buffer size to 32 bytes to silence gcc.

intel_watermark.c:203:57: warning: ‘%c’ directive output may be truncated writing 1 byte into a region of size between 0 and 9 [-Wformat-truncation=]
      snprintf(reg_name, sizeof(reg_name), "PLANE_WM_%1d_%c_%1d",
                                                         ^~
intel_watermark.c:203:43: note: directive argument in the range [0, 8]
      snprintf(reg_name, sizeof(reg_name), "PLANE_WM_%1d_%c_%1d",
                                           ^~~~~~~~~~~~~~~~~~~~~
etc.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reported-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tools/intel_watermark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/intel_watermark.c b/tools/intel_watermark.c
index c09772eea334..1d087b49f8c2 100644
--- a/tools/intel_watermark.c
+++ b/tools/intel_watermark.c
@@ -163,7 +163,7 @@ static void skl_wm_dump(void)
 	uint32_t wm_trans[num_pipes][max_planes];
 	uint32_t buf_cfg[num_pipes][max_planes];
 	uint32_t wm_linetime[num_pipes];
-	char reg_name[20];
+	char reg_name[32];
 
 	intel_register_access_init(intel_get_pci_device(), 0, -1);
 
-- 
2.13.6

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-11-29 14:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21 18:49 [PATCH i-g-t 1/5] tools/intel_watermark: Silence gcc7 snprintf() warnings Ville Syrjala
2017-11-21 18:49 ` [PATCH i-g-t 2/5] tools/intel_watermark: Refactor reg name stuff Ville Syrjala
2017-11-21 18:49 ` [PATCH i-g-t 3/5] tools/intel_watermark: Clean up SKL plane names Ville Syrjala
2017-11-21 18:49 ` [PATCH i-g-t 4/5] tools/intel_watermark: Clean up formatting Ville Syrjala
2017-11-21 18:49 ` [PATCH i-g-t 5/5] tools/intel_watermark: Right justify register names Ville Syrjala
2017-11-22 23:44   ` Pandiyan, Dhinakaran
2017-11-29 14:31     ` Ville Syrjälä
2017-11-21 19:45 ` [PATCH i-g-t 1/5] tools/intel_watermark: Silence gcc7 snprintf() warnings Tvrtko Ursulin
2017-11-22 10:09 ` ✓ Fi.CI.BAT: success for series starting with [1/5] " Patchwork
2017-11-22 10:49 ` Patchwork
2017-11-22 11:55 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-11-23 12:02 ` ✓ Fi.CI.BAT: success " Patchwork

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.