diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-09-06 10:28:05 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-09-06 10:28:05 +0100 |
commit | f1af93971b7490792d8541bc790e0d8c6d787059 (patch) | |
tree | a38046712bbc3a3844d77452d16c84e716caa3d4 /dev-util/rocminfo/files | |
parent | fc637fb28da700da71ec2064d65ca5a7a31b9c6c (diff) |
gentoo resync : 06.08.2019
Diffstat (limited to 'dev-util/rocminfo/files')
-rw-r--r-- | dev-util/rocminfo/files/rocminfo-2.7.0-sizeof.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/dev-util/rocminfo/files/rocminfo-2.7.0-sizeof.patch b/dev-util/rocminfo/files/rocminfo-2.7.0-sizeof.patch new file mode 100644 index 000000000000..2d96bb227791 --- /dev/null +++ b/dev-util/rocminfo/files/rocminfo-2.7.0-sizeof.patch @@ -0,0 +1,23 @@ +From cf96f42165fe76b98f653f979b4c182279dcac64 Mon Sep 17 00:00:00 2001 +From: Wilfried Holzke <gentoo@holzke.net> +Date: Fri, 16 Aug 2019 22:04:52 +0200 +Subject: [PATCH] Fixed sizeof(err_val) to return the number of characters in + the array + +--- + rocminfo.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rocminfo.cc b/rocminfo.cc +index 9fddcfb..ee20da8 100755 +--- a/rocminfo.cc ++++ b/rocminfo.cc +@@ -72,7 +72,7 @@ + char* err_str = NULL; \ + if (hsa_status_string(err, \ + (const char**)&err_str) != HSA_STATUS_SUCCESS) { \ +- snprintf(&(err_val[0]), sizeof(err_val[12]), "%#x", (uint32_t)err); \ ++ snprintf(&(err_val[0]), sizeof(err_val), "%#x", (uint32_t)err); \ + err_str = &(err_val[0]); \ + } \ + printf("%shsa api call failure at: %s:%d\n", \ |