libnetmap: fix cast from uint64_t to void*
We use uintptr_t as an intermediate cast to avoid compiler warnings on 32 bit architectures. Reported by: adrian MFC after: 3 days
This commit is contained in:
parent
8e13d6dfb6
commit
92c5d82c86
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366011
@ -554,9 +554,9 @@ struct nmreq_option *nmreq_find_option(struct nmreq_header *, uint32_t);
|
|||||||
void nmreq_free_options(struct nmreq_header *);
|
void nmreq_free_options(struct nmreq_header *);
|
||||||
const char* nmreq_option_name(uint32_t);
|
const char* nmreq_option_name(uint32_t);
|
||||||
#define nmreq_foreach_option(h_, o_) \
|
#define nmreq_foreach_option(h_, o_) \
|
||||||
for ((o_) = (struct nmreq_option *)((h_)->nr_options);\
|
for ((o_) = (struct nmreq_option *)((uintptr_t)((h_)->nr_options));\
|
||||||
(o_) != NULL;\
|
(o_) != NULL;\
|
||||||
(o_) = (struct nmreq_option *)((o_)->nro_next))
|
(o_) = (struct nmreq_option *)((uintptr_t)((o_)->nro_next)))
|
||||||
|
|
||||||
/* nmctx manipulation */
|
/* nmctx manipulation */
|
||||||
|
|
||||||
|
@ -614,7 +614,7 @@ nmport_mmap(struct nmport_d *d)
|
|||||||
}
|
}
|
||||||
memset(m, 0, sizeof(*m));
|
memset(m, 0, sizeof(*m));
|
||||||
if (d->extmem != NULL) {
|
if (d->extmem != NULL) {
|
||||||
m->mem = (void *)d->extmem->nro_usrptr;
|
m->mem = (void *)((uintptr_t)d->extmem->nro_usrptr);
|
||||||
m->size = d->extmem->nro_info.nr_memsize;
|
m->size = d->extmem->nro_info.nr_memsize;
|
||||||
m->is_extmem = 1;
|
m->is_extmem = 1;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user