Index: include/libroar/config.h
===================================================================
--- include/libroar/config.h	(revision 5351)
+++ include/libroar/config.h	(revision 5357)
@@ -124,5 +124,5 @@
 int    roar_libroar_config_parse(char * txt, char * delm) _LIBROAR_ATTR_NONNULL(1);
 
-struct roar_libroar_config_codec * roar_libroar_config_codec_get(int codec, int create);
+struct roar_libroar_config_codec * roar_libroar_config_codec_get(int32_t codec, int create);
 
 int    roar_libroar_set_server(const char * server);
Index: include/libroar/ctl.h
===================================================================
--- include/libroar/ctl.h	(revision 5236)
+++ include/libroar/ctl.h	(revision 5357)
@@ -76,6 +76,6 @@
 
 // int array
-int roar_ctl_ia2m     (struct roar_message * m, int * data, int len);
-int roar_ctl_m2ia     (struct roar_message * m, int * data, int len);
+int roar_ctl_ia2m     (struct roar_message * m, int * data, size_t len);
+int roar_ctl_m2ia     (struct roar_message * m, int * data, size_t len);
 
 // client
Index: libroar/config.c
===================================================================
--- libroar/config.c	(revision 5351)
+++ libroar/config.c	(revision 5357)
@@ -37,5 +37,5 @@
 
 static struct roar_libroar_config_codec *
-           roar_libroar_config_codec_get_conf(uint32_t codec, int create, struct roar_libroar_config * config);
+           roar_libroar_config_codec_get_conf(int32_t codec, int create, struct roar_libroar_config * config);
 
 
@@ -104,5 +104,5 @@
 static int roar_libroar_config_parse_codec(struct roar_libroar_config * config, char * txt) {
  struct roar_libroar_config_codec * codec_cfg;
- int codec;
+ int32_t codec;
  char * codec_str, * option_str, * value_str;
  char * toksave = NULL;
@@ -312,5 +312,5 @@
 }
 
-struct roar_libroar_config_codec * roar_libroar_config_codec_get(int codec, int create) {
+struct roar_libroar_config_codec * roar_libroar_config_codec_get(int32_t codec, int create) {
  struct roar_libroar_config * config = roar_libroar_get_config();
  return roar_libroar_config_codec_get_conf(codec, create, config);
@@ -318,5 +318,5 @@
 
 static struct roar_libroar_config_codec *
-           roar_libroar_config_codec_get_conf(uint32_t codec, int create, struct roar_libroar_config * config) {
+           roar_libroar_config_codec_get_conf(int32_t codec, int create, struct roar_libroar_config * config) {
  size_t i;
  int need_new = 1;
@@ -335,5 +335,5 @@
  } else {
   for (i = 0; i < config->codecs.num; i++) {
-   if ( config->codecs.codec[i].codec == codec )
+   if ( config->codecs.codec[i].codec == (uint32_t)codec )
     return &(config->codecs.codec[i]);
    if ( config->codecs.codec[i].codec == (uint32_t)-1 )
Index: libroar/ctl.c
===================================================================
--- libroar/ctl.c	(revision 5236)
+++ libroar/ctl.c	(revision 5357)
@@ -347,6 +347,6 @@
 }
 
-int roar_ctl_ia2m     (struct roar_message * m, int * data, int len) {
- int i;
+int roar_ctl_ia2m     (struct roar_message * m, int * data, size_t len) {
+ size_t i;
 
  if ( len > LIBROAR_BUFFER_MSGDATA ) {
@@ -362,6 +362,6 @@
  return 0;
 }
-int roar_ctl_m2ia     (struct roar_message * m, int * data, int len) {
- int i;
+int roar_ctl_m2ia     (struct roar_message * m, int * data, size_t len) {
+ size_t i;
 
  if ( m->datalen > len ) {
@@ -448,8 +448,8 @@
 
 int roar_ctl_m2c      (struct roar_message * m, struct roar_client * c) {
- int i;
- int cur;
  uint32_t pid;
  size_t len;
+ size_t cur;
+ int i;
 
  if ( m == NULL || c == NULL ) {
Index: libroar/hash.c
===================================================================
--- libroar/hash.c	(revision 5284)
+++ libroar/hash.c	(revision 5357)
@@ -89,5 +89,5 @@
  {ROAR_HT_ISBN13,      "ISBN13",      8   },
  {ROAR_HT_ADLER32,     "ADLER32",     4   },
- {-1, NULL}
+ {-1, NULL, -1}
 };
 
@@ -211,5 +211,5 @@
  }
 
- if ( !(slen == -1 || digestlen == slen) ) {
+ if ( !(slen == -1 || (ssize_t)digestlen == slen) ) {
   roar_err_set(ROAR_ERROR_INVAL);
   return -1;
@@ -410,5 +410,5 @@
 
  algo = roar_ht2gcrypt_tested(algo);
- if ( algo == -1 )
+ if ( algo == (roar_hash_t)-1 )
   return -1;
 
@@ -447,5 +447,5 @@
 
  len = roar_ht_digestlen(algo);
- if ( len == -1 )
+ if ( len == (size_t)-1 ) /* this is a hack to avoid len to be of type ssize_t which breaks following code */
   return -1;
 
Index: libroar/ltm.c
===================================================================
--- libroar/ltm.c	(revision 5295)
+++ libroar/ltm.c	(revision 5357)
@@ -267,5 +267,5 @@
  ROAR_DBG("roar_ltm_get_streamptr(res=%p, streamidx=%i) = ?", res, streamidx);
 
- if ( res == NULL || streamidx < 0 || streamidx >= res->streams ) {
+ if ( res == NULL || streamidx >= res->streams ) {
   roar_err_set(ROAR_ERROR_FAULT);
   return NULL;
Index: libroar/vio_bio.c
===================================================================
--- libroar/vio_bio.c	(revision 5278)
+++ libroar/vio_bio.c	(revision 5357)
@@ -53,4 +53,6 @@
  return 0;
 #else
+ (void)calls, (void)bio;
+ roar_err_set(ROAR_ERROR_NOSYS);
  return -1;
 #endif
@@ -58,4 +60,5 @@
 
 BIO *   roar_vio_to_bio        (struct roar_vio_calls * calls) {
+ roar_err_set(ROAR_ERROR_NOSYS);
  return NULL;
 }
Index: libroar/vio_cmd.c
===================================================================
--- libroar/vio_cmd.c	(revision 5278)
+++ libroar/vio_cmd.c	(revision 5357)
@@ -297,10 +297,10 @@
  int max_fh;
  int ret;
- char   tbuf[ROAR_VIO_CMD_BUFSIZE];
- char * tp   = NULL;
- size_t tlen = 0;
- int    nonblock = state->options & ROAR_VIO_CMD_OPTS_NONBLOCK;
- int    in, out;
- int    eating = 1;
+ char    tbuf[ROAR_VIO_CMD_BUFSIZE];
+ char  * tp   = NULL;
+ ssize_t tlen = 0;
+ int     nonblock = state->options & ROAR_VIO_CMD_OPTS_NONBLOCK;
+ int     in, out;
+ int     eating = 1;
 
  ROAR_DBG("roar_vio_cmd_read(*) = ?");
Index: libroar/vio_rtp.c
===================================================================
--- libroar/vio_rtp.c	(revision 5278)
+++ libroar/vio_rtp.c	(revision 5357)
@@ -44,5 +44,5 @@
  {ROAR_RTP_PT_A_L16_441_2, {.codec = ROAR_CODEC_PCM_S_BE, .bits = 16, .rate = 44100, .channels = 2}},
  {ROAR_RTP_PT_A_L16_441_1, {.codec = ROAR_CODEC_PCM_S_BE, .bits = 16, .rate = 44100, .channels = 1}},
- {-1, {-1, -1, -1}}
+ {-1, {-1, -1, -1, -1}}
 };
 
@@ -127,5 +127,5 @@
  size_t len_need = self->mtu * 4 + sizeof(struct roar_rtp_header); // we hope to never get pkgs with size > 4*mtu
  size_t len_have;
- size_t have = 0;
+ ssize_t have = 0;
  ssize_t ret;
  union {
@@ -202,5 +202,5 @@
  data.vp += dataoffset;
 
- if ( ret <= count ) {
+ if ( ret <= (ssize_t)count ) {
   memcpy(buf, data.vp, ret);
   ROAR_DBG("roar_vio_rtp_read(vio=%p, buf=%p, count=?) = %llu", vio, buf, (long long unsigned)(have+ret));
@@ -251,5 +251,5 @@
   }
 
-  return len_have ? len_have : ret;
+  return len_have ? (ssize_t)len_have : ret;
  }
 
Index: libroar/vs.c
===================================================================
--- libroar/vs.c	(revision 5315)
+++ libroar/vs.c	(revision 5357)
@@ -1288,5 +1288,5 @@
  struct roar_vio_selecttv rtv = {.sec = 0, .nsec = 1};
  size_t len = 0;
- ssize_t i;
+ size_t i;
  ssize_t ret;
  int can_read = 0, can_write = 0;
@@ -1399,5 +1399,5 @@
   if ( ret == -1 ) {
    return -1;
-  } else if ( ret == len ) {
+  } else if ( ret == (ssize_t)len ) {
    roar_buffer_free(vss->writebuffer);
    vss->writebuffer = NULL;
@@ -1419,5 +1419,5 @@
   if ( ret == -1 ) {
    return -1;
-  } else if ( ret == len ) {
+  } else if ( ret == (ssize_t)len ) {
    roar_buffer_free(vss->readbuffer);
    vss->readbuffer = NULL;
@@ -1462,5 +1462,5 @@
    if ( ret == -1 ) {
     return -1;
-   } else if ( ret == len ) {
+   } else if ( ret == (ssize_t)len ) {
     roar_buffer_free(vss->readbuffer);
     vss->readbuffer = NULL;
@@ -1504,5 +1504,5 @@
    ROAR_DBG("roar_vs_iterate(vss=%p, wait=%i, error=%p) = ?", vss, wait, error);
 
-   if ( len != ret ) {
+   if ( (ssize_t)len != ret ) {
     len = ret;
     if ( roar_buffer_set_len(vss->writebuffer, len) == -1 )
@@ -1516,5 +1516,5 @@
    if ( ret == -1 ) {
     return -1;
-   } else if ( ret == len ) {
+   } else if ( ret == (ssize_t)len ) {
     roar_buffer_free(vss->writebuffer);
     vss->writebuffer = NULL;
