From e2eeee29daecbdcad7f92bb12a736b73fc6ee402 Mon Sep 17 00:00:00 2001 From: lthakur Date: Tue, 17 Jul 2018 13:40:54 +0530 Subject: [PATCH] Update hipGetChanDesc.cpp Removed bool variable 'testResult' from global scope and confined it to the function. --- tests/src/texture/hipGetChanDesc.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/src/texture/hipGetChanDesc.cpp b/tests/src/texture/hipGetChanDesc.cpp index 8a72f14829..9034668ccf 100644 --- a/tests/src/texture/hipGetChanDesc.cpp +++ b/tests/src/texture/hipGetChanDesc.cpp @@ -33,12 +33,10 @@ using namespace std; #define R 8 //rows, height #define C 8 //columns, width -bool testResult = true; - bool runTest(void); int main(int argc, char** argv) { - testResult=runTest(); + bool testResult=runTest(); if (testResult) { passed(); @@ -47,12 +45,10 @@ int main(int argc, char** argv) { } } - bool runTest() { - +bool testResult=true; hipChannelFormatDesc chan_test,chan_desc=hipCreateChannelDesc(32,0,0,0,hipChannelFormatKindSigned); - hipArray *hipArray; HIPCHECK(hipMallocArray(&hipArray, &chan_desc,C,R,0)); HIPCHECK(hipGetChannelDesc(&chan_test,hipArray));