[PATCH] TraceWriterQEMU.cc: Initialize header._pad

Gedare Bloom gedare at rtems.org
Wed Sep 1 20:13:25 UTC 2021


ok

On Wed, Sep 1, 2021 at 12:52 PM Ryan Long <ryan.long at oarcorp.com> wrote:
>
> CID 1506204: Uninitialized scalar variable
>
> Closes #4488
> ---
>  tester/covoar/TraceWriterQEMU.cc | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tester/covoar/TraceWriterQEMU.cc b/tester/covoar/TraceWriterQEMU.cc
> index c417745..cc849b6 100644
> --- a/tester/covoar/TraceWriterQEMU.cc
> +++ b/tester/covoar/TraceWriterQEMU.cc
> @@ -113,6 +113,7 @@ namespace Trace {
>      header.big_endian = false;
>      header.machine[0] = 0; // XXX ??
>      header.machine[1] = 0; // XXX ??
> +    header._pad = 0;
>      status = ::fwrite( &header, sizeof(trace_header), 1, traceFile );
>      if (status != 1) {
>        std::cerr << "Unable to write header to " << file << std::endl;
> --
> 1.8.3.1
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list