diff options
author | Cole Robinson <crobinso@redhat.com> | 2013-02-08 13:37:51 -0500 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2013-02-11 16:11:55 +0100 |
commit | 244fce3c0c54d1b956901f1a1f50d30fc377db59 (patch) | |
tree | ea79d1aad99e37d4502ad60c446559d10790b203 | |
parent | 81130cb538f528b68af0856452a207b0ccbf79a4 (diff) |
install-script tool: Fix compiler warning
osinfo-install-script.c: In function 'main':
osinfo-install-script.c:245:19: error: 'dir' may be used uninitialized in this function [-Werror=maybe-uninitialized]
osinfo-install-script.c:196:12: note: 'dir' was declared here
And add me to AUTHORS to appease syntax-check
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | tools/osinfo-install-script.c | 5 |
2 files changed, 4 insertions, 2 deletions
@@ -22,6 +22,7 @@ Patches contributed by: Eric Blake <eblake@redhat.com> Yuri Chornoivan <yurchor@ukr.net> Marc-André Lureau <marcandre.lureau@redhat.com> + Cole Robinson <crobinso@redhat.com> ...send patches to get your name here... -- End diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c index 73f1d3d..866a545 100644 --- a/tools/osinfo-install-script.c +++ b/tools/osinfo-install-script.c @@ -193,7 +193,7 @@ static gboolean generate_script(OsinfoOs *os) OsinfoInstallScriptList *scripts = osinfo_os_get_install_script_list(os); OsinfoInstallScriptList *profile_scripts; OsinfoFilter *filter; - GFile *dir; + GFile *dir = NULL; GList *l, *tmp; gboolean ret = FALSE; GError *error = NULL; @@ -242,7 +242,8 @@ static gboolean generate_script(OsinfoOs *os) g_object_unref(scripts); g_object_unref(filter); g_object_unref(profile_scripts); - g_object_unref(dir); + if (dir) + g_object_unref(dir); return ret; } |