diff --git a/src/modules/systemlib/param/param.c b/src/modules/systemlib/param/param.c index 5958399252..1973704738 100644 --- a/src/modules/systemlib/param/param.c +++ b/src/modules/systemlib/param/param.c @@ -235,7 +235,9 @@ param_find_changed(param_t param) static void param_notify_changes(bool is_saved) { - struct parameter_update_s pup = { .timestamp = hrt_absolute_time(), .saved = is_saved}; + struct parameter_update_s pup; + pup.timestamp = hrt_absolute_time(); + pup.saved = is_saved; /* * If we don't have a handle to our topic, create one now; otherwise diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index edaaa60423..5d39cc4bb7 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -170,6 +170,7 @@ add_gtest(sf0x_test) add_executable(param_test param_test.cpp uorb_stub.cpp ${PX4_SRC}/modules/systemlib/bson/tinybson.c ${PX4_SRC}/modules/systemlib/param/param.c) +target_link_libraries(param_test ${PX4_SITL_BUILD}/libmsg_gen.a) add_gtest(param_test) # param_shmem_test