[clinfo] 67/148: Fix a bug where PCI id's of 0x80 or higher got sign extended in output due to being cl_char in AMD's struct. 86:00.0 was shown as ffffff86:00.0

Andreas Beckmann anbe at moszumanska.debian.org
Mon Nov 17 14:09:47 UTC 2014


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch clinfo
in repository clinfo.

commit 8a6a85a721069371788bbab72dc3135cd0acc6e0
Author: magnum <john.magnum at hushmail.com>
Date:   Sun Sep 21 01:27:00 2014 +0200

    Fix a bug where PCI id's of 0x80 or higher got sign extended in output
    due to being cl_char in AMD's struct. 86:00.0 was shown as ffffff86:00.0
---
 src/clinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/clinfo.c b/src/clinfo.c
index c5fff88..0ae9545 100644
--- a/src/clinfo.c
+++ b/src/clinfo.c
@@ -367,7 +367,7 @@ printDeviceInfo(cl_uint d)
 				break;
 			case CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD:
 				snprintf(strbuf, bufsz, "PCI-E, %02x:%02x.%u",
-					devtopo.pcie.bus, devtopo.pcie.device, devtopo.pcie.function);
+					(cl_uchar)devtopo.pcie.bus, devtopo.pcie.device, devtopo.pcie.function);
 				break;
 			default:
 				snprintf(strbuf, bufsz, "<unknown (%u): %u %u %u %u %u>", devtopo.raw.type,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git



More information about the Pkg-opencl-commits mailing list