From d9eb0341cd3b0db96556e7b4b92bc20aa5afb460 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 7 Apr 2011 12:24:20 +0200 Subject: [PATCH] Some dead stores and build fixes reported by LLVM 2.9. --- lib/package_remove_obsoletes.c | 2 -- lib/repository_finddeps.c | 1 - lib/repository_findpkg.c | 1 - lib/util.c | 3 +++ 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/package_remove_obsoletes.c b/lib/package_remove_obsoletes.c index 119bbf76..0a633b25 100644 --- a/lib/package_remove_obsoletes.c +++ b/lib/package_remove_obsoletes.c @@ -39,7 +39,6 @@ int HIDDEN xbps_remove_obsoletes(prop_dictionary_t oldd, prop_dictionary_t newd) { - const struct xbps_handle *xhp; prop_object_iterator_t iter, iter2; prop_object_t obj, obj2; prop_string_t oldstr, newstr; @@ -52,7 +51,6 @@ xbps_remove_obsoletes(prop_dictionary_t oldd, prop_dictionary_t newd) assert(oldd != NULL); assert(newd != NULL); - xhp = xbps_handle_get(); again: iter = xbps_get_array_iter_from_dict(oldd, array_str); diff --git a/lib/repository_finddeps.c b/lib/repository_finddeps.c index 8838c42f..1547f868 100644 --- a/lib/repository_finddeps.c +++ b/lib/repository_finddeps.c @@ -81,7 +81,6 @@ store_dependency(prop_dictionary_t transd, prop_dictionary_t repo_pkgd) prop_object_release(dict); return rv; } - rv = 0; state = XBPS_PKG_STATE_NOT_INSTALLED; } if ((rv = xbps_set_pkg_state_dictionary(dict, state)) != 0) { diff --git a/lib/repository_findpkg.c b/lib/repository_findpkg.c index 4d33bfaf..b108994c 100644 --- a/lib/repository_findpkg.c +++ b/lib/repository_findpkg.c @@ -142,7 +142,6 @@ repository_find_pkg(const char *pattern, const char *reason) if (rv != ENOENT) goto out; /* Package not installed, don't error out */ - rv = 0; state = XBPS_PKG_STATE_NOT_INSTALLED; } if ((rv = xbps_set_pkg_state_dictionary(origin_pkgrd, state)) != 0) diff --git a/lib/util.c b/lib/util.c index 10c227b5..c9f9a74d 100644 --- a/lib/util.c +++ b/lib/util.c @@ -25,6 +25,9 @@ #ifdef HAVE_VASPRINTF # define _GNU_SOURCE /* for vasprintf(3) */ +# ifdef _XOPEN_SOURCE +# undef _XOPEN_SOURCE +# endif # include # undef _GNU_SOURCE #else