[Scummvm-git-logs] scummvm master -> 5304df12f1232ddcfa33fcffed1cd5fb4ad01275

lephilousophe noreply at scummvm.org
Sun Feb 19 12:21:06 UTC 2023


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
68bba9c909 HPL1: Fix build with Clang on x64 platforms
5304df12f1 HPL1: Fix build with Clang on x64 platforms


Commit: 68bba9c909a0d2c85bba4de128740a31541eb7f6
    https://github.com/scummvm/scummvm/commit/68bba9c909a0d2c85bba4de128740a31541eb7f6
Author: Kai Knoblich (kai at FreeBSD.org)
Date: 2023-02-19T13:21:00+01:00

Commit Message:
HPL1: Fix build with Clang on x64 platforms

The HPL1 engine seems to be still under heavy development so this is
rather a workaround to fix the build on x64 platforms with Clang which
is very strict regarding pointer conversions to smaller types.

Changed paths:
    engines/hpl1/engine/libraries/newton/core/dgPolyhedra.cpp


diff --git a/engines/hpl1/engine/libraries/newton/core/dgPolyhedra.cpp b/engines/hpl1/engine/libraries/newton/core/dgPolyhedra.cpp
index 62d8e1c0885..b63f55eed7e 100644
--- a/engines/hpl1/engine/libraries/newton/core/dgPolyhedra.cpp
+++ b/engines/hpl1/engine/libraries/newton/core/dgPolyhedra.cpp
@@ -2714,7 +2714,7 @@ void dgPolyhedra::Optimize(const dgFloat64 *const array, dgInt32 strideInBytes,
 							if (handle) {
 								handle->m_edge = NULL;
 							}
-							ptr->m_userData = dgUnsigned32(NULL);
+							ptr->m_userData = (dgUnsigned32)(size_t)(NULL);
 
 						}
 
@@ -2753,7 +2753,7 @@ void dgPolyhedra::Optimize(const dgFloat64 *const array, dgInt32 strideInBytes,
 									if (handle) {
 										handle->m_edge = NULL;
 									}
-									ptr1->m_userData = dgUnsigned32(NULL);
+									ptr1->m_userData = (dgUnsigned32)(size_t)(NULL);
 
 								}
 							}
@@ -2780,7 +2780,7 @@ void dgPolyhedra::Optimize(const dgFloat64 *const array, dgInt32 strideInBytes,
 									if (handle) {
 										handle->m_edge = NULL;
 									}
-									ptr1->m_twin->m_userData = dgUnsigned32(NULL);
+									ptr1->m_twin->m_userData = (dgUnsigned32)(size_t)(NULL);
 
 								}
 							}


Commit: 5304df12f1232ddcfa33fcffed1cd5fb4ad01275
    https://github.com/scummvm/scummvm/commit/5304df12f1232ddcfa33fcffed1cd5fb4ad01275
Author: Kai Knoblich (kai at FreeBSD.org)
Date: 2023-02-19T13:21:00+01:00

Commit Message:
HPL1: Fix build with Clang on x64 platforms

The HPL1 engine seems to be still under heavy development so this is
rather a workaround to fix the build on x64 platforms with Clang which
is very strict regarding pointer conversions to smaller types.

Amend this issue after brief consultation with upstream by using
`PointerToInt(NULL)` instead of `dgUnsigned32(NULL)`.

Changed paths:
    engines/hpl1/engine/libraries/newton/core/dgPolyhedra.cpp


diff --git a/engines/hpl1/engine/libraries/newton/core/dgPolyhedra.cpp b/engines/hpl1/engine/libraries/newton/core/dgPolyhedra.cpp
index b63f55eed7e..926d9203512 100644
--- a/engines/hpl1/engine/libraries/newton/core/dgPolyhedra.cpp
+++ b/engines/hpl1/engine/libraries/newton/core/dgPolyhedra.cpp
@@ -2714,7 +2714,7 @@ void dgPolyhedra::Optimize(const dgFloat64 *const array, dgInt32 strideInBytes,
 							if (handle) {
 								handle->m_edge = NULL;
 							}
-							ptr->m_userData = (dgUnsigned32)(size_t)(NULL);
+							ptr->m_userData = PointerToInt(NULL);
 
 						}
 
@@ -2753,7 +2753,7 @@ void dgPolyhedra::Optimize(const dgFloat64 *const array, dgInt32 strideInBytes,
 									if (handle) {
 										handle->m_edge = NULL;
 									}
-									ptr1->m_userData = (dgUnsigned32)(size_t)(NULL);
+									ptr1->m_userData = PointerToInt(NULL);
 
 								}
 							}
@@ -2780,7 +2780,7 @@ void dgPolyhedra::Optimize(const dgFloat64 *const array, dgInt32 strideInBytes,
 									if (handle) {
 										handle->m_edge = NULL;
 									}
-									ptr1->m_twin->m_userData = (dgUnsigned32)(size_t)(NULL);
+									ptr1->m_twin->m_userData = PointerToInt(NULL);
 
 								}
 							}




More information about the Scummvm-git-logs mailing list