Fix maybe-uninitialized warnings detected by LTO.

This commit is contained in:
Juan RP 2019-12-27 10:53:10 +01:00
parent 9775a20dbc
commit 0e1482917a
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368
2 changed files with 5 additions and 4 deletions

View File

@ -263,7 +263,7 @@ parse_array_in_pkg_dictionary(FILE *f, xbps_dictionary_t plistd,
{
xbps_dictionary_keysym_t dksym;
xbps_object_t keyobj, sub_keyobj;
const char *tmpkeyname, *cfprop;
const char *tmpkeyname, *cfprop = NULL;
char *keyname;
for (unsigned int i = 0; i < xbps_array_count(allkeys); i++) {

View File

@ -410,8 +410,9 @@ xbps_alternatives_unregister(struct xbps_handle *xhp, xbps_dictionary_t pkgd)
*/
static void
prune_altgroup(struct xbps_handle *xhp, xbps_dictionary_t repod,
char *pkgname, const char *pkgver, const char *keyname) {
const char *newpkg, *curpkg;
char *pkgname, const char *pkgver, const char *keyname)
{
const char *newpkg = NULL, *curpkg = NULL;
xbps_array_t array;
xbps_dictionary_t alternatives;
xbps_string_t kstr;
@ -560,7 +561,7 @@ xbps_alternatives_register(struct xbps_handle *xhp, xbps_dictionary_t pkg_repod)
for (unsigned int i = 0; i < xbps_array_count(allkeys); i++) {
xbps_array_t array;
xbps_object_t keysym;
const char *keyname, *first;
const char *keyname, *first = NULL;
keysym = xbps_array_get(allkeys, i);
keyname = xbps_dictionary_keysym_cstring_nocopy(keysym);