Re: [PATCH spice-gtk] gtk-session: Set value directly

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

 



On 02/17/2017 06:17 PM, Pavel Grunt wrote:
On Fri, 2017-02-17 at 10:01 -0600, Jonathon Jongsma wrote:
On Fri, 2017-02-17 at 13:44 +0100, Pavel Grunt wrote:
Spotted by coverity

Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>

out of curiosity, what did coverity actually say here?


spice-gtk-0.33.53-7cb7-dirty/src/spice-gtk-session.c:920:9: note:
Value stored to 'new_len' during its initialization is never read
#    int new_len = *len;

An alternative fix can be simply not initialize new_len.
       int new_len;

new_len will be assigned a value in one of the if blocks.

This is just a nitpick, the suggested fix also works.


Uri.

#        ^~~~~~~   ~~~~
#  918|   {
#  919|       char *conv = NULL;
#  920|->     int new_len = *len;
#  921|
#  922|       if (spice_main_agent_test_capability(self->priv->main,
VD_AGENT_CAP_GUEST_LINEEND_CRLF)) {



_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]