From 96fe50531118d568bef98f3df917e6136dcbd712 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Mon, 13 Jun 2022 08:23:17 +0530 Subject: [PATCH] Update hipHostMallocTests.cc std::numeric_limits::max() conflicts with max() defined in windows headers. Wrap it in parenthesis to prevent macro expansion. --- catch/unit/memory/hipHostMallocTests.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catch/unit/memory/hipHostMallocTests.cc b/catch/unit/memory/hipHostMallocTests.cc index b0f3d4dbfa..9b25f613ac 100644 --- a/catch/unit/memory/hipHostMallocTests.cc +++ b/catch/unit/memory/hipHostMallocTests.cc @@ -46,12 +46,12 @@ TEST_CASE("Unit_hipHostMalloc_ArgValidation") { } SECTION("Size as max(size_t)") { - HIP_CHECK_ERROR(hipHostMalloc(&ptr, std::numeric_limits::max()), + HIP_CHECK_ERROR(hipHostMalloc(&ptr, (std::numeric_limits::max)()), hipErrorMemoryAllocation); } SECTION("Flags as max(uint)") { - HIP_CHECK_ERROR(hipHostMalloc(&ptr, allocSize, std::numeric_limits::max()), + HIP_CHECK_ERROR(hipHostMalloc(&ptr, allocSize, (std::numeric_limits::max)()), hipErrorInvalidValue); }