aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons/NativeInteger.c
diff options
context:
space:
mode:
authorvlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826>2004-08-11 09:07:36 +0000
committervlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826>2004-08-11 09:07:36 +0000
commitda6746826902cb81a338d867bae88274b52ff36e (patch)
tree218489b82ada10db374ddff9220cb30880d9fb44 /skeletons/NativeInteger.c
parentf5202a5df63b805a19fa3fa033662d1f18bb7ef5 (diff)
C++ compatibility
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@92 59561ff5-6e30-0410-9f3c-9617f08c8826
Diffstat (limited to 'skeletons/NativeInteger.c')
-rw-r--r--skeletons/NativeInteger.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/skeletons/NativeInteger.c b/skeletons/NativeInteger.c
index 3dce02f0..ca29049b 100644
--- a/skeletons/NativeInteger.c
+++ b/skeletons/NativeInteger.c
@@ -40,7 +40,7 @@ asn1_TYPE_descriptor_t asn1_DEF_NativeInteger = {
ber_dec_rval_t
NativeInteger_decode_ber(asn1_TYPE_descriptor_t *td,
void **int_ptr, void *buf_ptr, size_t size, int tag_mode) {
- int *Int = *int_ptr;
+ int *Int = (int *)*int_ptr;
ber_dec_rval_t rval;
ber_dec_ctx_t ctx = { 0, 0, 0, 0 };
ber_tlv_len_t length;
@@ -49,7 +49,7 @@ NativeInteger_decode_ber(asn1_TYPE_descriptor_t *td,
* If the structure is not there, allocate it.
*/
if(Int == NULL) {
- Int = *int_ptr = CALLOC(1, sizeof(*Int));
+ (void *)Int = *int_ptr = CALLOC(1, sizeof(*Int));
if(Int == NULL) {
rval.code = RC_FAIL;
rval.consumed = 0;
@@ -89,7 +89,7 @@ NativeInteger_decode_ber(asn1_TYPE_descriptor_t *td,
{
INTEGER_t tmp;
long l;
- tmp.buf = buf_ptr;
+ tmp.buf = (uint8_t *)buf_ptr;
tmp.size = length;
if(asn1_INTEGER2long(&tmp, &l)) {
@@ -165,7 +165,7 @@ NativeInteger_encode_der(asn1_TYPE_descriptor_t *sd, void *ptr,
int
NativeInteger_print(asn1_TYPE_descriptor_t *td, const void *sptr, int ilevel,
asn_app_consume_bytes_f *cb, void *app_key) {
- const int *Int = sptr;
+ const int *Int = (const int *)sptr;
char scratch[32]; /* Enough for 64-bit int */
int ret;