-rw-r--r-- | lib/util.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/util.cc b/lib/util.cc index 94f6f53..94e09ed 100644 --- a/lib/util.cc +++ b/lib/util.cc @@ -30,5 +30,6 @@ namespace opkele { BIO_push(b64,bmem); - if(BIO_write(b64,data,length)!=length) + if(((size_t)BIO_write(b64,data,length))!=length) throw exception_openssl(OPKELE_CP_ "failed to BIO_write()"); - BIO_flush(b64); + if(BIO_flush(b64)!=1) + throw exception_openssl(OPKELE_CP_ "failed to BIO_flush()"); char *rvd; @@ -146,3 +147,3 @@ namespace opkele { int r=snprintf(rv,sizeof(rv),"%ld",l); - if(r<0 || r>=sizeof(rv)) + if(r<0 || r>=(int)sizeof(rv)) throw failed_conversion(OPKELE_CP_ "failed to snprintf()"); |