@@ -339,7 +339,7 @@ TEST_F(DrmMemoryManagerTest, AllocateThenFree) {
339
339
mock->ioctl_expected .gemWait = 1 ;
340
340
mock->ioctl_expected .gemClose = 1 ;
341
341
342
- auto alloc = reinterpret_cast <DrmAllocation *>(memoryManager->allocateGraphicsMemory (1024 ));
342
+ auto alloc = static_cast <DrmAllocation *>(memoryManager->allocateGraphicsMemory (1024 ));
343
343
ASSERT_NE (nullptr , alloc);
344
344
EXPECT_NE (nullptr , alloc->getBO ());
345
345
@@ -796,7 +796,7 @@ TEST_F(DrmMemoryManagerTest, Given32bitAllocatorWhenAskedForBufferCreatedFromHos
796
796
797
797
EXPECT_TRUE (buffer->isMemObjZeroCopy ());
798
798
auto bufferAddress = buffer->getGraphicsAllocation ()->getGpuAddress ();
799
- auto drmAllocation = ( DrmAllocation *) buffer->getGraphicsAllocation ();
799
+ auto drmAllocation = static_cast < DrmAllocation *>( buffer->getGraphicsAllocation () );
800
800
801
801
uintptr_t address64bitOnGpu = (uintptr_t )bufferAddress;
802
802
@@ -875,7 +875,7 @@ TEST_F(DrmMemoryManagerTest, Given32bitAllocatorWhenAskedForBufferCreatedFrom64B
875
875
EXPECT_LT (address64bit - baseAddress, max32BitAddress);
876
876
}
877
877
878
- auto drmAllocation = ( DrmAllocation *) buffer->getGraphicsAllocation ();
878
+ auto drmAllocation = static_cast < DrmAllocation *>( buffer->getGraphicsAllocation () );
879
879
880
880
EXPECT_TRUE (drmAllocation->is32BitAllocation );
881
881
@@ -1499,7 +1499,7 @@ TEST_F(DrmMemoryManagerTest, given32BitAddressingWhenBufferFromSharedHandleAndBi
1499
1499
osHandle handle = 1u ;
1500
1500
this ->mock ->outputHandle = 2u ;
1501
1501
auto graphicsAllocation = memoryManager->createGraphicsAllocationFromSharedHandle (handle, true );
1502
- auto drmAllocation = ( DrmAllocation *) graphicsAllocation;
1502
+ auto drmAllocation = static_cast < DrmAllocation *>( graphicsAllocation) ;
1503
1503
EXPECT_TRUE (graphicsAllocation->is32BitAllocation );
1504
1504
EXPECT_EQ (1 , lseekCalledCount);
1505
1505
EXPECT_EQ (BIT32_ALLOCATOR_EXTERNAL, drmAllocation->getBO ()->peekAllocationType ());
@@ -1517,7 +1517,7 @@ TEST_F(DrmMemoryManagerTest, given32BitAddressingWhenBufferFromSharedHandleIsCre
1517
1517
osHandle handle = 1u ;
1518
1518
this ->mock ->outputHandle = 2u ;
1519
1519
auto graphicsAllocation = memoryManager->createGraphicsAllocationFromSharedHandle (handle, false );
1520
- auto drmAllocation = ( DrmAllocation *) graphicsAllocation;
1520
+ auto drmAllocation = static_cast < DrmAllocation *>( graphicsAllocation) ;
1521
1521
EXPECT_FALSE (graphicsAllocation->is32BitAllocation );
1522
1522
EXPECT_EQ (1 , lseekCalledCount);
1523
1523
EXPECT_EQ (MMAP_ALLOCATOR, drmAllocation->getBO ()->peekAllocationType ());
@@ -1535,7 +1535,7 @@ TEST_F(DrmMemoryManagerTest, givenNon32BitAddressingWhenBufferFromSharedHandleIs
1535
1535
osHandle handle = 1u ;
1536
1536
this ->mock ->outputHandle = 2u ;
1537
1537
auto graphicsAllocation = memoryManager->createGraphicsAllocationFromSharedHandle (handle, true );
1538
- auto drmAllocation = ( DrmAllocation *) graphicsAllocation;
1538
+ auto drmAllocation = static_cast < DrmAllocation *>( graphicsAllocation) ;
1539
1539
EXPECT_FALSE (graphicsAllocation->is32BitAllocation );
1540
1540
EXPECT_EQ (1 , lseekCalledCount);
1541
1541
EXPECT_EQ (MMAP_ALLOCATOR, drmAllocation->getBO ()->peekAllocationType ());
@@ -1591,7 +1591,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenLockUnlockIsCalledOnAlloca
1591
1591
EXPECT_EQ (allocation->getUnderlyingBuffer (), ptr);
1592
1592
1593
1593
// check DRM_IOCTL_I915_GEM_SET_DOMAIN input params
1594
- auto drmAllocation = ( DrmAllocation *) allocation;
1594
+ auto drmAllocation = static_cast < DrmAllocation *>( allocation) ;
1595
1595
EXPECT_EQ ((uint32_t )drmAllocation->getBO ()->peekHandle (), mock->setDomainHandle );
1596
1596
EXPECT_EQ ((uint32_t )I915_GEM_DOMAIN_CPU, mock->setDomainReadDomains );
1597
1597
EXPECT_EQ (0u , mock->setDomainWriteDomain );
@@ -1628,7 +1628,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenLockUnlockIsCalledOnAlloca
1628
1628
auto ptr = memoryManager->lockResource (allocation);
1629
1629
EXPECT_NE (nullptr , ptr);
1630
1630
1631
- auto drmAllocation = ( DrmAllocation *) allocation;
1631
+ auto drmAllocation = static_cast < DrmAllocation *>( allocation) ;
1632
1632
EXPECT_NE (nullptr , drmAllocation->getBO ()->peekLockedAddress ());
1633
1633
1634
1634
// check DRM_IOCTL_I915_GEM_MMAP input params
@@ -1834,8 +1834,8 @@ TEST_F(DrmMemoryManagerTest, givenMemoryManagerSupportingVirutalPaddingWhenItIsR
1834
1834
EXPECT_FALSE (paddedAllocation->isCoherent ());
1835
1835
EXPECT_EQ (0u , paddedAllocation->fragmentsStorage .fragmentCount );
1836
1836
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 ();
1839
1839
EXPECT_NE (nullptr , bo);
1840
1840
1841
1841
EXPECT_EQ (bufferWithPaddingSize, bo->peekUnmapSize ());
0 commit comments