fix some compings warings not all yet

svn path=/trunk/; revision=10890
This commit is contained in:
Magnus Olsen 2004-09-17 17:31:08 +00:00
parent 25547e2d8c
commit 7a1f8074b5
3 changed files with 11 additions and 11 deletions

View file

@ -124,7 +124,7 @@ int adns__vbuf_ensure(vbuf *vb, int want) {
}
void adns__vbuf_appendq(vbuf *vb, const byte *data, int len) {
memcpy(vb->buf+vb->used,data,len);
memcpy(vb->buf+vb->used,data, (size_t) len);
vb->used+= len;
}
@ -327,9 +327,9 @@ void adns__isort(void *array, int nobjs, int sz, void *tempbuf,
place>0 && needswap(context, data + (place-1)*sz, data + i*sz);
place--);
if (place != i) {
memcpy(tempbuf, data + i*sz, sz);
memcpy(tempbuf, data + i*sz, (size_t) sz);
memmove(data + (place+1)*sz, data + place*sz, (i-place)*sz);
memcpy(data + place*sz, tempbuf, sz);
memcpy(data + place*sz, tempbuf, (size_t) sz);
}
}
}

View file

@ -103,7 +103,7 @@ static void query_submit(adns_state ads, adns_query qu,
qu->id= id;
qu->query_dglen= qu->vb.used;
memcpy(qu->query_dgram,qu->vb.buf,qu->vb.used);
memcpy(qu->query_dgram,qu->vb.buf,(size_t) qu->vb.used);
adns__query_send(qu,now);
}
@ -118,7 +118,7 @@ adns_status adns__internal_submit(adns_state ads, adns_query *query_r,
if (!qu) { adns__vbuf_free(qumsg_vb); return adns_s_nomemory; }
*query_r= qu;
memcpy(&qu->ctx,ctx,sizeof(qu->ctx));
memcpy(&qu->ctx,ctx,(size_t) sizeof(qu->ctx));
query_submit(ads,qu, typei,qumsg_vb,id,flags,now);
return adns_s_ok;
@ -196,7 +196,7 @@ static int save_owner(adns_query qu, const char *owner, int ol) {
ans->owner= adns__alloc_preserved(qu,ol+1); if (!ans->owner) return 0;
memcpy(ans->owner,owner,ol);
memcpy(ans->owner,owner, (size_t) ol);
ans->owner[ol]= 0;
return 1;
}
@ -558,7 +558,7 @@ void adns__makefinal_str(adns_query qu, char **strp) {
if (!before) return;
l= strlen(before)+1;
after= adns__alloc_final(qu,l);
memcpy(after,before,l);
memcpy(after,before,(size_t) l);
*strp= after;
}
@ -568,6 +568,6 @@ void adns__makefinal_block(adns_query qu, void **blpp, size_t sz) {
before= *blpp;
if (!before) return;
after= adns__alloc_final(qu,sz);
memcpy(after,before,sz);
memcpy(after,before, (size_t) sz);
*blpp= after;
}

View file

@ -211,9 +211,9 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen,
if (!qu->answer->cname) { adns__query_fail(qu,adns_s_nomemory); return; }
qu->cname_dgram= adns__alloc_mine(qu,dglen);
memcpy(qu->cname_dgram,dgram,dglen);
memcpy(qu->cname_dgram,dgram,(size_t) dglen);
memcpy(qu->answer->cname,qu->vb.buf,l);
memcpy(qu->answer->cname,qu->vb.buf, (size_t) l);
cname_here= 1;
adns__update_expires(qu,ttl,now);
/* If we find the answer section truncated after this point we restart
@ -364,7 +364,7 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen,
qu->query_dgram= newquery;
qu->query_dglen= qu->vb.used;
memcpy(newquery,qu->vb.buf,qu->vb.used);
memcpy(newquery,qu->vb.buf, (size_t) qu->vb.used);
}
if (qu->state == query_tcpw) qu->state= query_tosend;