Fix uninitialized var in hipDeviceGetAttribute (#1497)

This fixes the usage of an uninitialized cdattr variable in hipDeviceGetAttribute for the CUDA backend when taking the switch default, as detailed in #1317.

Note that the directed_tests/runtimeApi/device/hipGetDeviceAttribute.tst test fails for me, but it already did before applying this patch. Let's see what CI says!
이 커밋은 다음에 포함됨:
Philip Salzmann 작성하고 Maneesh Gupta가 2019-10-04 13:39:19 +05:30를 커밋함
1 부모 d5a61736d8
커밋 11f23bba39
1 파일이 변경됨
+1 -2
+1 -2
파일 보기
@@ -992,8 +992,7 @@ inline static hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t att
cdattr = cudaDevAttrEccEnabled;
break;
default:
cerror = cudaErrorInvalidValue;
break;
return hipCUDAErrorTohipError(cudaErrorInvalidValue);
}
cerror = cudaDeviceGetAttribute(pi, cdattr, device);