Commit 2015d6d1 authored by Ville Syrjälä's avatar Ville Syrjälä

tools/intel_watermark: Silence gcc7 snprintf() warnings

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",

Cc: Dhinakaran Pandiyan <>
Cc: Tvrtko Ursulin <>
Reported-by: Tvrtko Ursulin's avatarTvrtko Ursulin <>
Reviewed-by: Tvrtko Ursulin's avatarTvrtko Ursulin <>
Tested-by: Tvrtko Ursulin's avatarTvrtko Ursulin <>
Reviewed-by: Dhinakaran Pandiyan's avatarDhinakaran Pandiyan <>
Signed-off-by: Ville Syrjälä's avatarVille Syrjälä <>
parent 643dc097
......@@ -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);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment