Misc cleanups: use __attribute__((__unused__)); remove dead code.
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
*/
|
||||
|
||||
xbps_array_t
|
||||
xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans_user)
|
||||
xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans_user _unused)
|
||||
{
|
||||
xbps_array_t rdeps, reqby, array = NULL;
|
||||
xbps_dictionary_t pkgd, deppkgd;
|
||||
@@ -70,8 +70,6 @@ xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans_user)
|
||||
bool automatic = false;
|
||||
unsigned int i, x, j, cnt, reqbycnt;
|
||||
|
||||
(void)orphans_user;
|
||||
|
||||
if (xbps_pkgdb_init(xhp) != 0)
|
||||
return NULL;
|
||||
if ((array = xbps_array_create()) == NULL)
|
||||
|
||||
@@ -46,12 +46,10 @@ struct fetch_archive {
|
||||
};
|
||||
|
||||
static int
|
||||
fetch_archive_open(struct archive *a, void *client_data)
|
||||
fetch_archive_open(struct archive *a _unused, void *client_data)
|
||||
{
|
||||
struct fetch_archive *f = client_data;
|
||||
|
||||
(void)a;
|
||||
|
||||
f->fetch = fetchGet(f->url, NULL);
|
||||
if (f->fetch == NULL)
|
||||
return ENOENT;
|
||||
@@ -60,23 +58,20 @@ fetch_archive_open(struct archive *a, void *client_data)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
fetch_archive_read(struct archive *a, void *client_data, const void **buf)
|
||||
fetch_archive_read(struct archive *a _unused, void *client_data, const void **buf)
|
||||
{
|
||||
struct fetch_archive *f = client_data;
|
||||
|
||||
(void)a;
|
||||
*buf = f->buffer;
|
||||
|
||||
return fetchIO_read(f->fetch, f->buffer, sizeof(f->buffer));
|
||||
}
|
||||
|
||||
static int
|
||||
fetch_archive_close(struct archive *a, void *client_data)
|
||||
fetch_archive_close(struct archive *a _unused, void *client_data)
|
||||
{
|
||||
struct fetch_archive *f = client_data;
|
||||
|
||||
(void)a;
|
||||
|
||||
if (f->fetch != NULL)
|
||||
fetchIO_close(f->fetch);
|
||||
free(f);
|
||||
|
||||
@@ -75,15 +75,13 @@ find_pkg_cb(struct xbps_repo *repo, void *arg, bool *done)
|
||||
}
|
||||
|
||||
static int
|
||||
find_pkg_revdeps_cb(struct xbps_repo *repo, void *arg, bool *done)
|
||||
find_pkg_revdeps_cb(struct xbps_repo *repo, void *arg, bool *done _unused)
|
||||
{
|
||||
struct rpool_fpkg *rpf = arg;
|
||||
xbps_array_t revdeps = NULL;
|
||||
const char *pkgver;
|
||||
unsigned int i;
|
||||
|
||||
(void)done;
|
||||
|
||||
revdeps = xbps_repo_get_pkg_revdeps(repo, rpf->pattern);
|
||||
if (xbps_array_count(revdeps)) {
|
||||
/* found */
|
||||
@@ -99,14 +97,12 @@ find_pkg_revdeps_cb(struct xbps_repo *repo, void *arg, bool *done)
|
||||
}
|
||||
|
||||
static int
|
||||
find_best_pkg_cb(struct xbps_repo *repo, void *arg, bool *done)
|
||||
find_best_pkg_cb(struct xbps_repo *repo, void *arg, bool *done _unused)
|
||||
{
|
||||
struct rpool_fpkg *rpf = arg;
|
||||
xbps_dictionary_t pkgd;
|
||||
const char *repopkgver;
|
||||
|
||||
(void)done;
|
||||
|
||||
pkgd = xbps_repo_get_pkg(repo, rpf->pattern);
|
||||
if (pkgd == NULL) {
|
||||
if (errno && errno != ENOENT)
|
||||
|
||||
Reference in New Issue
Block a user