Skip to content

fix build error on gcc 15.1.1 #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions lib/libzsync/zsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,12 @@ const char *const *zsync_get_urls(struct zsync_state *zs, int *n, int *t) {
if (zs->zmap && zs->nzurl) {
*n = zs->nzurl;
*t = 1;
return zs->zurl;
return (const char *const *)zs->zurl;
}
else {
*n = zs->nurl;
*t = 0;
return zs->url;
return (const char *const *)zs->url;
}
}

Expand Down Expand Up @@ -947,7 +947,7 @@ static int zsync_receive_data_compressed(struct zsync_receiver *zr,

if (zr->strm.total_in == 0 || offset != zr->strm.total_in) {
zsync_configure_zstream_for_zdata(zr->zs, &(zr->strm), offset,
&(zr->outoffset));
(long long *)&(zr->outoffset));

/* On first iteration, we might be reading an incomplete block from zsync's point of view. Limit avail_out so we can stop after doing that and realign with the buffer. */
zr->strm.avail_out = blocksize - (zr->outoffset % blocksize);
Expand Down