diff options
| author | Hiroki Shirokura <hiroki.shirokura@linecorp.com> | 2021-12-30 13:13:37 +0000 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2023-02-09 15:48:39 +0100 |
| commit | c86a325285f66a5a43a4097a373c890ad4703e87 (patch) | |
| tree | cbfef42169f6469e3df7fe90f5917c2855592ce9 /lib/admin_group.c | |
| parent | 8300f2f56cd30ad8d82ca6738c1417e0ee49800b (diff) | |
lib: add copy function for bitfield_t
Add a function to copy a bitfield_t structure.
Add a ‘void *’ to ‘word_t *’ converstion in bf_init() to avoid the
following error:
> ./lib/bitfield.h: In function ‘bf_copy’:
> ./lib/bitfield.h:75:12: error: request for implicit conversion from ‘void *’ to ‘word_t *’ {aka ‘unsigned int *’} not permitted in C++ [-Werror=c++-compat]
> (v).data = XCALLOC(MTYPE_BITFIELD, ((v).m * sizeof(word_t))); \
> ^
> ./lib/bitfield.h:278:2: note: in expansion of macro ‘bf_init’
> bf_init(dst, WORD_SIZE * (src.m - 1));
> ^~~~~~~
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'lib/admin_group.c')
0 files changed, 0 insertions, 0 deletions
