lkml.org 
[lkml]   [2020]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ptp: ptp_clockmatrix: initialize variables
On Sun, Oct 11, 2020 at 01:09:55PM -0700, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
>
> Clang static analysis reports this representative problem
>
> ptp_clockmatrix.c:1852:2: warning: 5th function call argument
> is an uninitialized value
> snprintf(idtcm->version, sizeof(idtcm->version), "%u.%u.%u",
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> idtcm_display_version_info() calls several idtcm_read_*'s without
> checking a return status.

So why not check the return status?

Your patch papers over the issue.

Thanks,
Richard

\
 
 \ /
  Last update: 2020-10-13 00:02    [W:0.039 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site