clang does not like type casting from (uint8_t *) to (uint32_t *) or (uint16_t *). Adding a (void *) in between helps.
This commit is contained in:
committed by
Joseph Henry
parent
5c41a0c75c
commit
07fa921276
@@ -922,7 +922,7 @@ igmp3_report:
|
|||||||
record->sources = short_be(sources);
|
record->sources = short_be(sources);
|
||||||
record->mcast_group = p->mcast_group.addr;
|
record->mcast_group = p->mcast_group.addr;
|
||||||
if (IGMPFilter && !pico_tree_empty(IGMPFilter)) {
|
if (IGMPFilter && !pico_tree_empty(IGMPFilter)) {
|
||||||
uint32_t *source_addr = (uint32_t *)((uint8_t *)record + sizeof(struct igmpv3_group_record));
|
uint32_t *source_addr = (uint32_t *)((void *)((uint8_t *)record + sizeof(struct igmpv3_group_record)));
|
||||||
i = 0;
|
i = 0;
|
||||||
pico_tree_foreach(index, IGMPFilter)
|
pico_tree_foreach(index, IGMPFilter)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ static struct pico_frame *pico_frame_do_alloc(uint32_t size, int zerocopy, int e
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
p->usage_count = (uint32_t *)(((uint8_t*)p->buffer) + frame_buffer_size);
|
p->usage_count = (uint32_t *)((void *)(((uint8_t*)p->buffer) + frame_buffer_size));
|
||||||
} else {
|
} else {
|
||||||
p->buffer = NULL;
|
p->buffer = NULL;
|
||||||
p->flags |= PICO_FRAME_FLAG_EXT_USAGE_COUNTER;
|
p->flags |= PICO_FRAME_FLAG_EXT_USAGE_COUNTER;
|
||||||
@@ -154,7 +154,7 @@ int pico_frame_grow(struct pico_frame *f, uint32_t size)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
f->usage_count = (uint32_t *)(((uint8_t*)f->buffer) + frame_buffer_size);
|
f->usage_count = (uint32_t *)((void *)(((uint8_t*)f->buffer) + frame_buffer_size));
|
||||||
*f->usage_count = usage_count;
|
*f->usage_count = usage_count;
|
||||||
f->buffer_len = size;
|
f->buffer_len = size;
|
||||||
memcpy(f->buffer, oldbuf, oldsize);
|
memcpy(f->buffer, oldbuf, oldsize);
|
||||||
@@ -247,7 +247,7 @@ static inline uint32_t pico_checksum_adder(uint32_t sum, void *data, uint32_t le
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
stop = (uint16_t *)(((uint8_t *)data) + len);
|
stop = (uint16_t *)((void *)(((uint8_t *)data) + len));
|
||||||
|
|
||||||
while (buf < stop) {
|
while (buf < stop) {
|
||||||
sum += *buf++;
|
sum += *buf++;
|
||||||
|
|||||||
Reference in New Issue
Block a user