Fix warnings detected by LTO.

This commit is contained in:
Juan RP
2020-04-23 08:32:54 +02:00
parent e7c1f411ec
commit 530e79c7ee
5 changed files with 8 additions and 6 deletions

View File

@@ -428,7 +428,7 @@ create_dot_graph(struct xbps_handle *xhp,
{
xbps_dictionary_t sub_confd;
xbps_array_t allkeys, rdeps;
const char *pkgver, *cfprop;
const char *pkgver = NULL, *cfprop;
xbps_dictionary_get_cstring_nocopy(plistd, "pkgver", &pkgver);

View File

@@ -539,14 +539,16 @@ pkgdb_get_pkgs_cb(struct xbps_handle *xhp UNUSED,
void *arg, bool *done UNUSED)
{
xbps_array_t *array = arg;
const char *pkgname;
const char *pkgname = NULL;
bool automatic = false;
xbps_dictionary_get_bool(obj, "automatic-install", &automatic);
if (automatic)
return 0;
xbps_dictionary_get_cstring_nocopy(obj, "pkgname", &pkgname);
if (!xbps_dictionary_get_cstring_nocopy(obj, "pkgname", &pkgname))
return EINVAL;
xbps_array_add_cstring_nocopy(*array, pkgname);
return 0;
}