anv: give more room to debug report

Graphics / Mesa 3D Graphics Library / Mesa - Caio Marcelo de Oliveira Filho [intel.com] - 18 July 2018 15:29 EDT

The error buffer is limited to 256, but the report contains the filename and possibly other data. So give it more space.

Avoids the warnings

../../src/intel/vulkan/anv_util.c: In function ‘__anv_perf_warn’: ../../src/intel/vulkan/anv_util.c:66:42: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 254 [-Wformat-truncation=] snprintf(report, sizeof(report), "%s: %s", file, buffer); ^~ ~~~~~~ ../../src/intel/vulkan/anv_util.c:66:4: note: ‘snprintf’ output 3 or more bytes (assuming 258) into a destination of size 256 snprintf(report, sizeof(report), "%s: %s", file, buffer); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../../src/intel/vulkan/anv_util.c: In function ‘__vk_errorf’: ../../src/intel/vulkan/anv_util.c:96:48: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 252 [-Wformat-truncation=] snprintf(report, sizeof(report), "%s:%d: %s (%s)", file, line, buffer, ^~ ~~~~~~ ../../src/intel/vulkan/anv_util.c:96:7: note: ‘snprintf’ output 8 or more bytes (assuming 263) into a destination of size 256 snprintf(report, sizeof(report), "%s:%d: %s (%s)", file, line, buffer, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error_str);

20fcd152a2 anv: give more room to debug report
src/intel/vulkan/anv_util.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Upstream: cgit.freedesktop.org


  • Share