Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix uninitialized warnings causing build failure
Bryan Drewery committed 13 years ago
commit 69e0e116fd42964f78843bb7b51425af6d6ae316
parent d4283a3
6 files changed +8 -7
modified libpkg/backup.c
@@ -91,6 +91,7 @@ copy_database(sqlite3 *src, sqlite3 *dst, const char *name)
	b = sqlite3_backup_init(dst, "main", src, "main");

	elapsed = -1;
+
	done = total = 0;
	start = time(NULL);

	do {
modified libpkg/fetch.c
@@ -128,8 +128,8 @@ pkg_fetch_file_to_fd(const char *url, int dest, time_t t)
	bool srv = false;
	bool http = false;
	char zone[MAXHOSTNAMELEN + 13];
-
	struct dns_srvinfo *srv_current;
-
	struct http_mirror *http_current;
+
	struct dns_srvinfo *srv_current = NULL;
+
	struct http_mirror *http_current = NULL;
	const char *mt;

	fetchTimeout = 30;
modified libpkg/pkg_elf.c
@@ -240,8 +240,8 @@ analyse_elf(struct pkg *pkg, const char *fpath,
	struct stat sb;
	int ret = EPKG_OK;

-
	size_t numdyn;
-
	size_t sh_link;
+
	size_t numdyn = 0;
+
	size_t sh_link = 0;
	size_t dynidx;
	const char *osname;
	const char *shlib;
modified libpkg/pkg_repo.c
@@ -523,7 +523,7 @@ static int
maybe_delete_conflicting(const char *origin, const char *version,
			 const char *pkg_path)
{
-
	int ret;
+
	int ret = EPKG_FATAL;
	const char *oversion;

	if (run_prepared_statement(VERSION, origin) != SQLITE_ROW)
modified pkg/create.c
@@ -81,7 +81,7 @@ pkg_create_matches(int argc, char **argv, match_t match, pkg_formats fmt,
	struct pkg_head head = STAILQ_HEAD_INITIALIZER(head);
	struct pkg_entry *e = NULL;
	char pkgpath[MAXPATHLEN];
-
	const char *format;
+
	const char *format = NULL;
	bool foundone;

#ifndef PKG_COMPAT
modified pkg/update.c
@@ -49,7 +49,7 @@ pkgcli_update(bool force) {
	const char *repo_name;
	bool multi_repos = false;
	struct pkg_config_kv *repokv = NULL;
-
	int retcode;
+
	int retcode = EPKG_FATAL;

	if (!quiet)
		printf("Updating repository catalogue\n");