modify x86 compilation issues

Signed-off-by: xwh <jiewenhao@huawei.com>
This commit is contained in:
xwh 2023-10-09 02:41:03 +00:00 committed by Gitee
parent d5ac559a2f
commit 3efd5e7448
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 8 additions and 8 deletions

View File

@ -390,9 +390,9 @@ static unsigned char ConvertAdvFilter(unsigned char advFilter)
static void ConvertAdvData(const SoftBusBleAdvData *src, StartAdvRawData *dst)
{
dst->advDataLen = src->advLength;
dst->advData = (unsigned char *)src->advData;
dst->advData = src->advData;
dst->rspDataLen = src->scanRspLength;
dst->rspData = (unsigned char *)src->scanRspData;
dst->rspData = src->scanRspData;
}
static void ConvertAdvParam(const SoftBusBleAdvParams *src, BleAdvParams *dst)

View File

@ -86,9 +86,9 @@ typedef enum {
typedef struct {
unsigned short advLength;
char *advData;
unsigned char *advData;
unsigned short scanRspLength;
char *scanRspData;
unsigned char *scanRspData;
} SoftBusBleAdvData;
typedef struct {

View File

@ -677,12 +677,12 @@ static int32_t BuildBleConfigAdvData(SoftBusBleAdvData *advData, const Broadcast
if (advData == NULL || broadcastData == NULL) {
return SOFTBUS_INVALID_PARAM;
}
advData->advData = (char *)SoftBusCalloc(ADV_DATA_MAX_LEN + ADV_HEAD_LEN);
advData->advData = (unsigned char *)SoftBusCalloc(ADV_DATA_MAX_LEN + ADV_HEAD_LEN);
if (advData->advData == NULL) {
DLOGE("malloc failed");
return SOFTBUS_MALLOC_ERR;
}
advData->scanRspData = (char *)SoftBusCalloc(RESP_DATA_MAX_LEN + RSP_HEAD_LEN);
advData->scanRspData = (unsigned char *)SoftBusCalloc(RESP_DATA_MAX_LEN + RSP_HEAD_LEN);
if (advData->scanRspData == NULL) {
DLOGE("malloc failed");
SoftBusFree(advData->advData);

View File

@ -450,9 +450,9 @@ HWTEST_F(AdapterBleGattTest, AdvertiseLifecycle, TestSize.Level3)
0x18, 0x33, 0x39, 0x36, 0x62, 0x33, 0x61, 0x33, 0x31, 0x21, 0x00, 0x02, 0x0A, 0xEF};
const unsigned char scanRspDataExample[] = {0x03, 0xFF, 0x7D, 0x02};
SoftBusBleAdvData data = {.advLength = sizeof(advDataExample),
.advData = (char *)advDataExample,
.advData = (unsigned char *)advDataExample,
.scanRspLength = sizeof(scanRspDataExample),
.scanRspData = (char *)scanRspDataExample};
.scanRspData = (unsigned char *)scanRspDataExample};
ASSERT_EQ(SoftBusSetAdvData(advId, &data), SOFTBUS_OK);
ASSERT_TRUE(advDataCtx.Expect(advId, SOFTBUS_BT_STATUS_SUCCESS));