C++ compatibility


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@583 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/skeletons/der_encoder.c b/skeletons/der_encoder.c
index b2763c7..62ad757 100644
--- a/skeletons/der_encoder.c
+++ b/skeletons/der_encoder.c
@@ -36,7 +36,7 @@
 	size_t left;
 } enc_to_buf_arg;
 static int encode_to_buffer_cb(const void *buffer, size_t size, void *key) {
-	enc_to_buf_arg *arg = key;
+	enc_to_buf_arg *arg = (enc_to_buf_arg *)key;
 
 	if(arg->left < size)
 		return -1;	/* Data exceeds the available buffer size */
@@ -64,7 +64,7 @@
 		struct_ptr,	/* Pointer to the destination structure */
 		0, 0, encode_to_buffer_cb, &arg);
 	if(ec.encoded != -1) {
-		assert(ec.encoded == (*buffer_size - arg.left));
+		assert(ec.encoded == (ssize_t)(*buffer_size - arg.left));
 		/* Return the encoded contents size */
 		*buffer_size = ec.encoded;
 	}