mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-20 17:33:08 +00:00
Fix compiler warnings
This commit is contained in:
parent
d4320f20da
commit
cc51edd39d
@ -178,7 +178,7 @@ static void resolve_request(){
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv){
|
||||
int main(void){
|
||||
struct pollfd fds[2];
|
||||
int mdp_sockfd;
|
||||
|
||||
|
@ -775,7 +775,7 @@ static int insert_mime_part_body(struct http_request *hr, char *buf, size_t len)
|
||||
if (newlen > MAX_MANIFEST_BYTES) {
|
||||
if (config.debug.rhizome)
|
||||
DEBUGF("manifest too large, %zu bytes overflows maximum %zu by %zu",
|
||||
newlen, MAX_MANIFEST_BYTES, (size_t)(newlen - MAX_MANIFEST_BYTES)
|
||||
newlen, (size_t)MAX_MANIFEST_BYTES, (size_t)(newlen - MAX_MANIFEST_BYTES)
|
||||
);
|
||||
http_request_simple_response(&r->http, 403, "Manifest size overflow");
|
||||
return 403;
|
||||
|
@ -311,7 +311,7 @@ int rhizome_random_write(struct rhizome_write *write_state, uint64_t offset, uns
|
||||
|
||||
// skip over incoming data that we've already received
|
||||
if (offset < last_offset){
|
||||
int64_t delta = last_offset - offset;
|
||||
uint64_t delta = last_offset - offset;
|
||||
if (delta >= data_size)
|
||||
break;
|
||||
data_size -= delta;
|
||||
|
2
rotbuf.h
2
rotbuf.h
@ -130,7 +130,7 @@ __ROTBUF_INLINE size_t rotbuf_remain(struct rotbuf *rb)
|
||||
*/
|
||||
__ROTBUF_INLINE size_t rotbuf_count(struct rotbuf *rb)
|
||||
{
|
||||
return rb->wrap ? (rb->ebuf - rb->buf) + rb->wrap - 1 : rotbuf_position(rb);
|
||||
return rb->wrap ? (size_t)((rb->ebuf - rb->buf) + rb->wrap - 1) : rotbuf_position(rb);
|
||||
}
|
||||
|
||||
void rotbuf_log(struct __sourceloc __whence, int log_level, const char *prefix, const struct rotbuf *rb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user