Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/xbps-checkvers/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,8 @@ static int
rcv_check_version(rcv_t *rcv)
{
const char *repover = NULL;
char srcver[BUFSIZ] = { '\0' }, *binpkgname = NULL, *s = NULL;
char srcver[BUFSIZ] = { '\0' }, *binpkgname = NULL;
const char *s = NULL;
const char *pkgname, *version, *revision, *reverts, *repourl;
int sz;
size_t len;
Expand Down Expand Up @@ -661,7 +662,7 @@ template_removed_cb(struct xbps_handle *xhp UNUSED,
bool *done UNUSED)
{
char *pkgname;
char *last_dash;
const char *last_dash;
bool dummy_bool = false;
rcv_t *rcv = arg;

Expand Down
2 changes: 1 addition & 1 deletion bin/xbps-create/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ process_one_alternative(const char *altgrname, const char *val)
{
xbps_dictionary_t d;
xbps_array_t a;
char *altfiles;
const char *altfiles;
bool alloc = false;

if ((d = xbps_dictionary_get(pkg_propsd, "alternatives")) == NULL) {
Expand Down
3 changes: 2 additions & 1 deletion bin/xbps-uchroot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ static void
add_bindmount(const char *bm, bool ro)
{
struct bindmnt *bmnt;
char *b, *src, *dest;
char *src;
const char *b, *dest;
size_t len;

src = strdup(bm);
Expand Down
3 changes: 2 additions & 1 deletion lib/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ parse_option(char *line, size_t linelen, char **valp, size_t *vallen)
{
size_t len;
char *p;
struct key needle, *result;
struct key needle;
const struct key *result;

p = strpbrk(line, " \t=");
if (p == NULL)
Expand Down
4 changes: 2 additions & 2 deletions lib/fetch/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ struct index_parser {
static ssize_t
parse_index(struct index_parser *parser, const char *buf, size_t len)
{
char *end_attr, p = *buf;
const char *end_attr, p = *buf;

switch (parser->state) {
case ST_NONE:
Expand Down Expand Up @@ -1463,7 +1463,7 @@ parse_index(struct index_parser *parser, const char *buf, size_t len)
end_attr = memchr(buf, '"', len);
if (end_attr == NULL)
return 0;
*end_attr = '\0';
*(char *)(uintptr_t)end_attr = '\0';
parser->state = ST_TAGA;
if (fetch_add_entry(parser->ue, parser->url, buf, 1))
return -1;
Expand Down
8 changes: 4 additions & 4 deletions lib/package_unpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ unpack_archive(struct xbps_handle *xhp,
struct archive_entry *entry;
ssize_t entry_size;
const char *entry_pname, *pkgname;
char *buf = NULL;
const char *buf = NULL;
int ar_rv, rv, error, entry_type, flags;
bool preserve, update, file_exists, keep_conf_file;
bool skip_extract, force, xucd_stats;
Expand Down Expand Up @@ -454,14 +454,14 @@ unpack_archive(struct xbps_handle *xhp,
if (!xbps_dictionary_externalize_to_file(binpkg_filesd, buf)) {
rv = errno;
umask(prev_umask);
free(buf);
free((void *)(uintptr_t)buf);
xbps_set_cb_state(xhp, XBPS_STATE_UNPACK_FAIL,
rv, pkgver, "%s: [unpack] failed to externalize pkg "
"pkg metadata files: %s", pkgver, strerror(rv));
goto out;
}
umask(prev_umask);
free(buf);
free((void *)(uintptr_t)buf);
}
out:
/*
Expand All @@ -470,7 +470,7 @@ unpack_archive(struct xbps_handle *xhp,
if (!xbps_dictionary_count(binpkg_filesd)) {
buf = xbps_xasprintf("%s/.%s-files.plist", xhp->metadir, pkgname);
unlink(buf);
free(buf);
free((void *)(uintptr_t)buf);
}
xbps_object_release(binpkg_filesd);

Expand Down
Loading