aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-02-29 14:58:03 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-02-29 14:58:03 -0600
commit9e2278a994df1d5a237e4f21bc191965323653c9 (patch)
tree7c9ddc3bca4d0c9bbffae07de0cd7a5d752e8e0b /libindicator
parentb6454804274860b4716ed6eae826a340e87408d0 (diff)
downloadlibayatana-indicator-9e2278a994df1d5a237e4f21bc191965323653c9.tar.gz
libayatana-indicator-9e2278a994df1d5a237e4f21bc191965323653c9.tar.bz2
libayatana-indicator-9e2278a994df1d5a237e4f21bc191965323653c9.zip
silence Coverity warning "PW.BRANCH_PAST_INITIALIZATION - CID 10615" reported in Bug #939061
Coverity is unhappy that the local variable "priv" is uninitialized if one of the goto branches is followed in this function. Since we only use priv once, a fairly clean way of sidestepping this warning is removing the local variable "priv" and instead using INDICATOR_OBJECT_GET_PRIVATE()'s return pointer directly.
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-object.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index 0674913..ca821af 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -464,9 +464,8 @@ indicator_object_new_from_file (const gchar * file)
goto unrefandout;
}
- IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(object);
/* Now we can track the module */
- priv->module = module;
+ INDICATOR_OBJECT_GET_PRIVATE(object)->module = module;
return INDICATOR_OBJECT(object);