rtems/printer.h Fix build warnings -Wclass-memaccess

This commit is contained in:
Aschref Ben Thabet
2020-08-11 10:41:26 +02:00
committed by Sebastian Huber
parent 3ec5f20484
commit 5869c64793

View File

@@ -130,7 +130,11 @@ static inline void rtems_printer_task_initialize(
rtems_printer_task_context *context rtems_printer_task_context *context
) )
{ {
memset( context, 0, sizeof( *context ) ); /*
* Some C++ compiler think that the structure is complex enough to need a
* proper constructor. Cast to void * to silence a warning.
*/
memset( (void *) context, 0, sizeof( *context ) );
} }
static inline void rtems_printer_task_set_stack_size( static inline void rtems_printer_task_set_stack_size(