Skip to content

Commit e5514eb

Browse files
committed
re-enable list_clear in dynamic mode
Requires no-cast-align for mpack to build for now. Added a todo to update mpack and fix upstream
1 parent ac822c1 commit e5514eb

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

include/param/param_list.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const param_t * param_list_from_line(const char * line);
6464
*/
6565
param_t * param_list_create_remote(int id, int node, int type, uint32_t mask, int array_size, char * name, char * unit, char * help, int storage_type);
6666

67+
void param_list_clear(void);
6768
void param_list_destroy(const param_t * param);
6869
void param_print(const param_t * param, int offset, int nodes[], int nodes_count, int verbose, uint32_t ref_timestamp);
6970

meson.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
project('param', 'c', subproject_dir:'lib', default_options: ['warning_level=2', 'werror=true'])
2-
add_project_arguments(['-Wstrict-prototypes', '-Wmissing-prototypes', '-Wmissing-declarations', '-Wcast-align', '-Wpointer-arith', '-Wshadow'], language: 'c')
2+
#add_project_arguments(['-Wstrict-prototypes', '-Wmissing-prototypes', '-Wmissing-declarations', '-Wcast-align', '-Wpointer-arith', '-Wshadow'], language: 'c')
3+
# We currently dos not build with cast align due to mpack.c in dynamic mode, todo update this and fix warnings
4+
add_project_arguments(['-Wstrict-prototypes', '-Wmissing-prototypes', '-Wmissing-declarations', '-Wno-cast-align', '-Wpointer-arith', '-Wshadow'], language: 'c')
35

46
conf = configuration_data()
57
conf.set('PARAM_HAVE_SYS_QUEUE', get_option('list_dynamic') or get_option('list_pool') > 0)

src/param/list/param_list.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,15 +412,13 @@ static void param_list_destroy_impl(const param_t * param) {
412412

413413
#ifdef PARAM_LIST_DYNAMIC
414414

415-
#if 0
416415
void param_list_clear(void) {
417416
while (!SLIST_EMPTY(&param_list_head)) {
418417
struct param_s *param = SLIST_FIRST(&param_list_head);
419418
SLIST_REMOVE_HEAD(&param_list_head, next);
420419
param_list_destroy(param);
421420
}
422421
}
423-
#endif
424422

425423
typedef struct param_heap_s {
426424
param_t param;

0 commit comments

Comments
 (0)