Skip to content

Commit 0d777cb

Browse files
lyakhlgirdwood
authored andcommitted
lib-manager: don't cast away "const"
Don't type-cast pointers to "const" objects to writable pointers even temporarily. This is error-prone and might cause future compiler warnings. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 901aeb3 commit 0d777cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/library_manager/lib_manager.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,9 @@ int lib_manager_register_module(const uint32_t component_id)
628628
goto cleanup;
629629
}
630630

631-
mod = (struct sof_man_module *)((const uint8_t *)desc + SOF_MAN_MODULE_OFFSET(entry_index));
632-
const struct sof_uuid *uid = (struct sof_uuid *)&mod->uuid;
631+
mod = (const struct sof_man_module *)((const uint8_t *)desc +
632+
SOF_MAN_MODULE_OFFSET(entry_index));
633+
const struct sof_uuid *uid = (const struct sof_uuid *)&mod->uuid;
633634

634635
lib_manager_prepare_module_adapter(drv, uid);
635636

0 commit comments

Comments
 (0)