aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2018-07-16 13:56:23 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2018-07-18 08:29:51 -0700
commit20fcd152a2843f8f55564b2f92aecc4e024386c3 (patch)
treee868fcdcbe0b0cc673c2924a3602e55f9cc1b3e3 /src/intel
parent01d02e8906a9bc327d257c7bccba39f6af74045f (diff)
anv: give more room to debug report
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); ~~~~~~~~~~ Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c
index 3c1803aa056..9082707624c 100644
--- a/src/intel/vulkan/anv_util.c
+++ b/src/intel/vulkan/anv_util.c
@@ -57,7 +57,7 @@ __anv_perf_warn(struct anv_instance *instance, const void *object,
{
va_list ap;
char buffer[256];
- char report[256];
+ char report[512];
va_start(ap, format);
vsnprintf(buffer, sizeof(buffer), format, ap);
@@ -84,7 +84,7 @@ __vk_errorf(struct anv_instance *instance, const void *object,
{
va_list ap;
char buffer[256];
- char report[256];
+ char report[512];
const char *error_str = vk_Result_to_str(error);