with the variables in the code that manipulates these values.
static void sum_sizes_sqroot(struct sum_struct *sum, uint64 len)
{
- extern int block_size;
- int blength, s2length, b;
+ extern unsigned int block_size;
+ unsigned int blength;
+ int s2length;
uint32 c;
uint64 l;
} else if (csum_length == SUM_LENGTH) {
s2length = SUM_LENGTH;
} else {
- b = BLOCKSUM_BIAS;
+ int b = BLOCKSUM_BIAS;
l = len;
while (l >>= 1) {
b += 2;
sum->remainder = (len % blength);
if (sum->count && verbose > 2) {
- rprintf(FINFO, "count=%ld rem=%ld blength=%ld s2length=%ld flength=%.0f\n",
- (long) sum->count, (long) sum->remainder,
- (long) sum->blength, (long) sum->s2length,
- (double) sum->flength);
+ rprintf(FINFO, "count=%ld rem=%u blength=%u s2length=%d flength=%.0f\n",
+ (long)sum->count, sum->remainder, sum->blength,
+ sum->s2length, (double)sum->flength);
}
}
OFF_T j;
if (verbose > 2 && i >= 0)
- rprintf(FINFO,"match at %.0f last_match=%.0f j=%d len=%d n=%.0f\n",
+ rprintf(FINFO,"match at %.0f last_match=%.0f j=%d len=%u n=%.0f\n",
(double)offset,(double)last_match,i,s->sums[i].len,(double)n);
send_token(f,i,buf,last_match,n,i<0?0:s->sums[i].len);
static void hash_search(int f,struct sum_struct *s,
- struct map_struct *buf,OFF_T len)
+ struct map_struct *buf, OFF_T len)
{
OFF_T offset, end;
int j,k, last_i;
sum = (s1 & 0xffff) | (s2 << 16);
tag_hits++;
for (; j < (int) s->count && targets[j].t == t; j++) {
- int l, i = targets[j].i;
+ unsigned int l;
+ int i = targets[j].i;
if (sum != s->sums[i].sum1) continue;
int keep_partial=0;
int safe_symlinks=0;
int copy_unsafe_links=0;
-int block_size=0;
int size_only=0;
int bwlimit=0;
int delete_after=0;
int ignore_errors=0;
int modify_window=0;
int blocking_io=-1;
+unsigned int block_size = 0;
/** Network address family. **/
if (x != 1) args[ac++] = argstr;
if (block_size) {
- snprintf(bsize,sizeof(bsize),"-B%d",block_size);
+ snprintf(bsize, sizeof bsize, "-B%u", block_size);
args[ac++] = bsize;
}
struct sum_buf {
OFF_T offset; /**< offset in file of this chunk */
- int len; /**< length of chunk of file */
+ unsigned int len; /**< length of chunk of file */
int i; /**< index of this chunk */
uint32 sum1; /**< simple checksum */
char sum2[SUM_LENGTH]; /**< checksum */
struct sum_struct {
OFF_T flength; /**< total file length */
size_t count; /**< how many chunks */
- size_t remainder; /**< flength % block_length */
- size_t blength; /**< block_length */
- size_t s2length; /**< sum2_length */
+ unsigned int blength; /**< block_length */
+ unsigned int remainder; /**< flength % block_length */
+ int s2length; /**< sum2_length */
struct sum_buf *sums; /**< points to info for each chunk */
};
s->sums = NULL;
- if (verbose > 3)
- rprintf(FINFO, "count=%ld n=%ld rem=%ld\n",
- (long) s->count, (long) s->blength,
- (long) s->remainder);
+ if (verbose > 3) {
+ rprintf(FINFO, "count=%ld n=%u rem=%u\n",
+ (long)s->count, s->blength, s->remainder);
+ }
if (s->count == 0)
return(s);