diff --git a/src/conf.c b/src/conf.c
index 6253fb9e..0c6c695f 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -227,7 +227,7 @@ static char *readline(FILE * fp, char *buf, size_t buflen) {
 	if(feof(fp))
 		return NULL;
 
-	p = fgets(buf, (int)buflen, fp);
+	p = fgets(buf, buflen, fp);
 
 	if(!p)
 		return NULL;
@@ -255,7 +255,7 @@ config_t *parse_config_line(char *line, const char *fname, int lineno) {
 	while(strchr("\t ", *--eol))
 		*eol = '\0';
 
-	len = (int)strcspn(value, "\t =");
+	len = strcspn(value, "\t =");
 	value += len;
 	value += strspn(value, "\t ");
 	if(*value == '=') {
diff --git a/src/hash.c b/src/hash.c
index 7836e51e..91fc3d67 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -28,8 +28,8 @@ static uint32_t hash_function(const void *p, size_t len) {
 	const uint8_t *q = p;
 	uint32_t hash = 0;
 	while(true) {
-		for(size_t i = len > 4 ? 4 : len; --i;)
-			hash += (uint32_t)(q[len - i] << (8 * i));
+		for(int i = len > 4 ? 4 : len; --i;)
+			hash += q[len - i] << (8 * i);
 		hash *= 0x9e370001UL; // Golden ratio prime.
 		if(len <= 4)
 			break;
diff --git a/src/meta.c b/src/meta.c
index 35672a78..9038ff85 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -142,7 +142,7 @@ bool receive_meta_sptps(void *handle, uint8_t type, const void *vdata, uint16_t
 }
 
 bool receive_meta(connection_t *c) {
-	ssize_t inlen;
+	int inlen;
 	char inbuf[MAXBUFSIZE];
 	char *bufp = inbuf, *endp;