@@ -339,7 +339,7 @@ TEST_F(DrmMemoryManagerTest, AllocateThenFree) {
339339 mock->ioctl_expected .gemWait = 1 ;
340340 mock->ioctl_expected .gemClose = 1 ;
341341
342- auto alloc = reinterpret_cast <DrmAllocation *>(memoryManager->allocateGraphicsMemory (1024 ));
342+ auto alloc = static_cast <DrmAllocation *>(memoryManager->allocateGraphicsMemory (1024 ));
343343 ASSERT_NE (nullptr , alloc);
344344 EXPECT_NE (nullptr , alloc->getBO ());
345345
@@ -796,7 +796,7 @@ TEST_F(DrmMemoryManagerTest, Given32bitAllocatorWhenAskedForBufferCreatedFromHos
796796
797797 EXPECT_TRUE (buffer->isMemObjZeroCopy ());
798798 auto bufferAddress = buffer->getGraphicsAllocation ()->getGpuAddress ();
799- auto drmAllocation = ( DrmAllocation *) buffer->getGraphicsAllocation ();
799+ auto drmAllocation = static_cast < DrmAllocation *>( buffer->getGraphicsAllocation () );
800800
801801 uintptr_t address64bitOnGpu = (uintptr_t )bufferAddress;
802802
@@ -875,7 +875,7 @@ TEST_F(DrmMemoryManagerTest, Given32bitAllocatorWhenAskedForBufferCreatedFrom64B
875875 EXPECT_LT (address64bit - baseAddress, max32BitAddress);
876876 }
877877
878- auto drmAllocation = ( DrmAllocation *) buffer->getGraphicsAllocation ();
878+ auto drmAllocation = static_cast < DrmAllocation *>( buffer->getGraphicsAllocation () );
879879
880880 EXPECT_TRUE (drmAllocation->is32BitAllocation );
881881
@@ -1499,7 +1499,7 @@ TEST_F(DrmMemoryManagerTest, given32BitAddressingWhenBufferFromSharedHandleAndBi
14991499 osHandle handle = 1u ;
15001500 this ->mock ->outputHandle = 2u ;
15011501 auto graphicsAllocation = memoryManager->createGraphicsAllocationFromSharedHandle (handle, true );
1502- auto drmAllocation = ( DrmAllocation *) graphicsAllocation;
1502+ auto drmAllocation = static_cast < DrmAllocation *>( graphicsAllocation) ;
15031503 EXPECT_TRUE (graphicsAllocation->is32BitAllocation );
15041504 EXPECT_EQ (1 , lseekCalledCount);
15051505 EXPECT_EQ (BIT32_ALLOCATOR_EXTERNAL, drmAllocation->getBO ()->peekAllocationType ());
@@ -1517,7 +1517,7 @@ TEST_F(DrmMemoryManagerTest, given32BitAddressingWhenBufferFromSharedHandleIsCre
15171517 osHandle handle = 1u ;
15181518 this ->mock ->outputHandle = 2u ;
15191519 auto graphicsAllocation = memoryManager->createGraphicsAllocationFromSharedHandle (handle, false );
1520- auto drmAllocation = ( DrmAllocation *) graphicsAllocation;
1520+ auto drmAllocation = static_cast < DrmAllocation *>( graphicsAllocation) ;
15211521 EXPECT_FALSE (graphicsAllocation->is32BitAllocation );
15221522 EXPECT_EQ (1 , lseekCalledCount);
15231523 EXPECT_EQ (MMAP_ALLOCATOR, drmAllocation->getBO ()->peekAllocationType ());
@@ -1535,7 +1535,7 @@ TEST_F(DrmMemoryManagerTest, givenNon32BitAddressingWhenBufferFromSharedHandleIs
15351535 osHandle handle = 1u ;
15361536 this ->mock ->outputHandle = 2u ;
15371537 auto graphicsAllocation = memoryManager->createGraphicsAllocationFromSharedHandle (handle, true );
1538- auto drmAllocation = ( DrmAllocation *) graphicsAllocation;
1538+ auto drmAllocation = static_cast < DrmAllocation *>( graphicsAllocation) ;
15391539 EXPECT_FALSE (graphicsAllocation->is32BitAllocation );
15401540 EXPECT_EQ (1 , lseekCalledCount);
15411541 EXPECT_EQ (MMAP_ALLOCATOR, drmAllocation->getBO ()->peekAllocationType ());
@@ -1591,7 +1591,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenLockUnlockIsCalledOnAlloca
15911591 EXPECT_EQ (allocation->getUnderlyingBuffer (), ptr);
15921592
15931593 // check DRM_IOCTL_I915_GEM_SET_DOMAIN input params
1594- auto drmAllocation = ( DrmAllocation *) allocation;
1594+ auto drmAllocation = static_cast < DrmAllocation *>( allocation) ;
15951595 EXPECT_EQ ((uint32_t )drmAllocation->getBO ()->peekHandle (), mock->setDomainHandle );
15961596 EXPECT_EQ ((uint32_t )I915_GEM_DOMAIN_CPU, mock->setDomainReadDomains );
15971597 EXPECT_EQ (0u , mock->setDomainWriteDomain );
@@ -1628,7 +1628,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenLockUnlockIsCalledOnAlloca
16281628 auto ptr = memoryManager->lockResource (allocation);
16291629 EXPECT_NE (nullptr , ptr);
16301630
1631- auto drmAllocation = ( DrmAllocation *) allocation;
1631+ auto drmAllocation = static_cast < DrmAllocation *>( allocation) ;
16321632 EXPECT_NE (nullptr , drmAllocation->getBO ()->peekLockedAddress ());
16331633
16341634 // check DRM_IOCTL_I915_GEM_MMAP input params
@@ -1834,8 +1834,8 @@ TEST_F(DrmMemoryManagerTest, givenMemoryManagerSupportingVirutalPaddingWhenItIsR
18341834 EXPECT_FALSE (paddedAllocation->isCoherent ());
18351835 EXPECT_EQ (0u , paddedAllocation->fragmentsStorage .fragmentCount );
18361836
1837- auto bufferbo = (( DrmAllocation *) buffer)->getBO ();
1838- auto bo = (( DrmAllocation *) paddedAllocation)->getBO ();
1837+ auto bufferbo = static_cast < DrmAllocation *>( buffer)->getBO ();
1838+ auto bo = static_cast < DrmAllocation *>( paddedAllocation)->getBO ();
18391839 EXPECT_NE (nullptr , bo);
18401840
18411841 EXPECT_EQ (bufferWithPaddingSize, bo->peekUnmapSize ());
0 commit comments