Re: [ibsim patch 19/23] sim_cmd.c: Delete unused value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/2/2019 8:13 AM, Honggang Li wrote:
> Issue was detected by Coverity.
> 
> Error: CLANG_WARNING: [#def3]
> ibsim-0.7/ibsim/sim_cmd.c:540:3: warning: Value stored to 'n' is never read
> //                n += sprintf(comment+n, "\t# err_attr %d", port->errattr);
> //                ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ibsim-0.7/ibsim/sim_cmd.c:540:3: note: Value stored to 'n' is never read
> //                n += sprintf(comment+n, "\t# err_attr %d", port->errattr);
> //                ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> //  538|   		n += sprintf(comment, "\t# err_rate %d", port->errrate);
> //  539|   	if (port->errattr)
> //  540|-> 		n += sprintf(comment+n, "\t# err_attr %d", port->errattr);
> //  541|   }
> //  542|
> 
> Signed-off-by: Honggang Li <honli@xxxxxxxxxx>

Thanks. Applied.

-- Hal



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux