mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
50 lines
3.3 KiB
Diff
50 lines
3.3 KiB
Diff
diff --git a/bt_host/Build/Core/ss1btps/OTP.c b/bt_host/Build/Core/ss1btps/OTP.c
|
|
index a70d71a..751354a 100644
|
|
--- a/bt_host/Build/Core/ss1btps/OTP.c
|
|
+++ b/bt_host/Build/Core/ss1btps/OTP.c
|
|
@@ -1694,7 +1694,7 @@ static char *ExtractNameFromObjectInfo(OTP_ObjectInfo_t *ObjectInfoPtr)
|
|
/* The Extended Name Bit is set, extract the pointer to the */
|
|
/* Name from the end of the Name member in the Object */
|
|
/* Information Structure. */
|
|
- ret_val = (char *)READ_OBJECT_INFO_EXTENDED_NAME(ObjectInfoPtr->Name);
|
|
+ ret_val = (char *)(uintptr_t)READ_OBJECT_INFO_EXTENDED_NAME(ObjectInfoPtr->Name);
|
|
}
|
|
else
|
|
{
|
|
@@ -1738,7 +1738,7 @@ static unsigned int ExtractNameLengthFromObjectInfo(OTP_ObjectInfo_t *ObjectInfo
|
|
/* The Extended Name Bit is set, extract the pointer to the */
|
|
/* Name from the end of the Name member in the Object */
|
|
/* Information Structure. */
|
|
- TempCharPtr = (char *)READ_OBJECT_INFO_EXTENDED_NAME(ObjectInfoPtr->Name);
|
|
+ TempCharPtr = (char *)(uintptr_t)READ_OBJECT_INFO_EXTENDED_NAME(ObjectInfoPtr->Name);
|
|
|
|
/* Set the return value to the length of the name. */
|
|
ret_val = BTPS_StringLength(TempCharPtr);
|
|
@@ -4798,7 +4798,7 @@ static void OTP_GetResponseEvent(unsigned int BluetoothStackID, OTP_Info_t *OTPI
|
|
/* Name member. If so free the memory that was */
|
|
/* allocated for this response. */
|
|
if(EventData->Event_Data.OTP_Get_Directory_Response_Data->DirInfo.ObjectInfo[TempIndex].FieldMask & OTP_OBJECT_INFO_MASK_EXTENDED_NAME)
|
|
- BTPS_FreeMemory((void *)READ_OBJECT_INFO_EXTENDED_NAME(EventData->Event_Data.OTP_Get_Directory_Response_Data->DirInfo.ObjectInfo[TempIndex].Name));
|
|
+ BTPS_FreeMemory((void *)(uintptr_t)READ_OBJECT_INFO_EXTENDED_NAME(EventData->Event_Data.OTP_Get_Directory_Response_Data->DirInfo.ObjectInfo[TempIndex].Name));
|
|
}
|
|
}
|
|
}
|
|
diff --git a/bt_host/Build/Linux/include/BaseTypes.h b/bt_host/Build/Linux/include/BaseTypes.h
|
|
index e04173a..cef6b84 100644
|
|
--- a/bt_host/Build/Linux/include/BaseTypes.h
|
|
+++ b/bt_host/Build/Linux/include/BaseTypes.h
|
|
@@ -218,10 +218,10 @@ typedef __PACKED_STRUCT_BEGIN__ struct _tagNonAlignedSQWord_t /* Unaligned Sign
|
|
/* format of the Native Host's processor. */
|
|
#define ASSIGN_HOST_DWORD_TO_LITTLE_ENDIAN_UNALIGNED_DWORD(_x, _y) \
|
|
{ \
|
|
- ((Byte_t *)(_x))[0] = ((Byte_t)(((DWord_t)(_y)) & 0xFF)); \
|
|
- ((Byte_t *)(_x))[1] = ((Byte_t)((((DWord_t)(_y)) >> 8) & 0xFF)); \
|
|
- ((Byte_t *)(_x))[2] = ((Byte_t)((((DWord_t)(_y)) >> 16) & 0xFF)); \
|
|
- ((Byte_t *)(_x))[3] = ((Byte_t)((((DWord_t)(_y)) >> 24) & 0xFF)); \
|
|
+ ((Byte_t *)(_x))[0] = ((Byte_t)(((DWord_t)(uintptr_t)(_y)) & 0xFF)); \
|
|
+ ((Byte_t *)(_x))[1] = ((Byte_t)((((DWord_t)(uintptr_t)(_y)) >> 8) & 0xFF)); \
|
|
+ ((Byte_t *)(_x))[2] = ((Byte_t)((((DWord_t)(uintptr_t)(_y)) >> 16) & 0xFF)); \
|
|
+ ((Byte_t *)(_x))[3] = ((Byte_t)((((DWord_t)(uintptr_t)(_y)) >> 24) & 0xFF)); \
|
|
}
|
|
|
|
/* The following is a utility MACRO that exists to Assign a */
|