avoided compilation warnings on gcc 3.3.x systems


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@212 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/skeletons/BOOLEAN.c b/skeletons/BOOLEAN.c
index da38772..b0ae178 100644
--- a/skeletons/BOOLEAN.c
+++ b/skeletons/BOOLEAN.c
@@ -61,7 +61,7 @@
 
 	ASN_DEBUG("Boolean length is %d bytes", (int)length);
 
-	(char *)buf_ptr += rval.consumed;
+	buf_ptr = ((char *)buf_ptr) + rval.consumed;
 	size -= rval.consumed;
 	if(length > (ber_tlv_len_t)size) {
 		rval.code = RC_WMORE;
diff --git a/skeletons/INTEGER.c b/skeletons/INTEGER.c
index 0c7a81a..16a6b74 100644
--- a/skeletons/INTEGER.c
+++ b/skeletons/INTEGER.c
@@ -67,7 +67,7 @@
 	/*
 	 * Make sure we have this length.
 	 */
-	(char *)buf_ptr += rval.consumed;
+	buf_ptr = ((char *)buf_ptr) + rval.consumed;
 	size -= rval.consumed;
 	if(length > (ber_tlv_len_t)size) {
 		rval.code = RC_WMORE;
diff --git a/skeletons/NativeInteger.c b/skeletons/NativeInteger.c
index 759fe27..b0cc3b7 100644
--- a/skeletons/NativeInteger.c
+++ b/skeletons/NativeInteger.c
@@ -74,7 +74,7 @@
 	/*
 	 * Make sure we have this length.
 	 */
-	(char *)buf_ptr += rval.consumed;
+	buf_ptr = ((char *)buf_ptr) + rval.consumed;
 	size -= rval.consumed;
 	if(length > (ber_tlv_len_t)size) {
 		rval.code = RC_WMORE;
diff --git a/skeletons/OBJECT_IDENTIFIER.c b/skeletons/OBJECT_IDENTIFIER.c
index 4e6270d..fe20905 100644
--- a/skeletons/OBJECT_IDENTIFIER.c
+++ b/skeletons/OBJECT_IDENTIFIER.c
@@ -332,7 +332,7 @@
 			*(unsigned char *)((char *)arcs
 				+ ((*(char *)&LE)?0:(arc_type_size - 1)))
 					= first_arc;
-			(char *)arcs += arc_type_size;
+			arcs = ((char *)arcs) + arc_type_size;
 		}
 
 		/* Decode, if has space */
@@ -342,7 +342,7 @@
 					arcs, arc_type_size))
 				return -1;
 			startn = i + 1;
-			(char *)arcs += arc_type_size;
+			arcs = ((char *)arcs) + arc_type_size;
 			add = 0;
 		}
 		num_arcs++;
@@ -538,7 +538,7 @@
 		 */
 		/* Copy the second (1'st) arcs[1] into the first_value */
 		*fv++ = 0;
-		(char *)arcs += arc_type_size;
+		arcs = ((char *)arcs) + arc_type_size;
 		if(isLittleEndian) {
 			uint8_t *aend = (unsigned char *)arcs - 1;
 			uint8_t *a1 = (unsigned char *)arcs + arc_type_size - 1;
@@ -567,8 +567,9 @@
 	/*
 	 * Save the rest of arcs.
 	 */
-	for((char *)arcs += arc_type_size, i = 2;
-			i < arc_slots; i++, (char *)arcs += arc_type_size) {
+	for(arcs = ((char *)arcs) + arc_type_size, i = 2;
+		i < arc_slots;
+			i++, arcs = ((char *)arcs) + arc_type_size) {
 		bp += OBJECT_IDENTIFIER_set_single_arc(bp,
 			arcs, arc_type_size, 0);
 	}
diff --git a/skeletons/OCTET_STRING.c b/skeletons/OCTET_STRING.c
index 8ea360d..6e0e426 100644
--- a/skeletons/OCTET_STRING.c
+++ b/skeletons/OCTET_STRING.c
@@ -37,11 +37,11 @@
 #define	NEXT_PHASE(ctx)	_CH_PHASE(ctx, +1)
 #define	PREV_PHASE(ctx)	_CH_PHASE(ctx, -1)
 
-#define	ADVANCE(num_bytes)	do {	\
-		size_t num = num_bytes;	\
-		(char *)buf_ptr += num;	\
-		size -= num;		\
-		consumed_myself += num;	\
+#define	ADVANCE(num_bytes)	do {			\
+		size_t num = num_bytes;			\
+		buf_ptr = ((char *)buf_ptr) + num;	\
+		size -= num;				\
+		consumed_myself += num;			\
 	} while(0)
 
 #define	RETURN(_code)	do {			\
diff --git a/skeletons/RELATIVE-OID.c b/skeletons/RELATIVE-OID.c
index 3273ace..252cc37 100644
--- a/skeletons/RELATIVE-OID.c
+++ b/skeletons/RELATIVE-OID.c
@@ -87,7 +87,7 @@
 					i - startn + 1, 0,
 					arcs, arc_type_size))
 				return -1;
-			(char *)arcs += arc_type_size;
+			arcs = ((char *)arcs) + arc_type_size;
 			num_arcs++;
 		}
 
@@ -122,7 +122,7 @@
 	/*
 	 * Encode the arcs.
 	 */
-	for(i = 0; i < arcs_slots; i++, (char *)arcs += arc_type_size) {
+	for(i = 0; i < arcs_slots; i++, arcs = ((char *)arcs) + arc_type_size) {
 		bp += OBJECT_IDENTIFIER_set_single_arc(bp,
 			arcs, arc_type_size, 0);
 	}
diff --git a/skeletons/ber_decoder.c b/skeletons/ber_decoder.c
index 0fd9b26..e56cc6a 100644
--- a/skeletons/ber_decoder.c
+++ b/skeletons/ber_decoder.c
@@ -7,7 +7,7 @@
 
 #define	ADVANCE(num_bytes)	do {			\
 		size_t num = num_bytes;			\
-		(char *)ptr += num;			\
+		ptr = ((char *)ptr) + num;		\
 		size -= num;				\
 		consumed_myself += num;			\
 	} while(0)
diff --git a/skeletons/ber_tlv_length.c b/skeletons/ber_tlv_length.c
index b3c1ceb..508bc39 100644
--- a/skeletons/ber_tlv_length.c
+++ b/skeletons/ber_tlv_length.c
@@ -87,7 +87,7 @@
 	 * Indefinite length!
 	 */
 	ASN_DEBUG("Skipping indefinite length");
-	for(skip = ll, (char *)ptr += ll, size -= ll;;) {
+	for(skip = ll, ptr = ((char *)ptr) + ll, size -= ll;;) {
 		ber_tlv_tag_t tag;
 
 		/* Fetch the tag */
@@ -95,7 +95,7 @@
 		if(tl <= 0) return tl;
 
 		ll = ber_skip_length(BER_TLV_CONSTRUCTED(ptr),
-			(char *)ptr + tl, size - tl);
+			((char *)ptr) + tl, size - tl);
 		if(ll <= 0) return ll;
 
 		skip += tl + ll;
@@ -109,7 +109,7 @@
 		&& ((uint8_t *)ptr)[1] == 0)
 			return skip;
 
-		(char *)ptr  += tl + ll;
+		ptr = ((char *)ptr) + tl + ll;
 		size -= tl + ll;
  	}
 
diff --git a/skeletons/ber_tlv_tag.c b/skeletons/ber_tlv_tag.c
index d69ba31..c0a0d6a 100644
--- a/skeletons/ber_tlv_tag.c
+++ b/skeletons/ber_tlv_tag.c
@@ -30,8 +30,8 @@
 	 * Each octet contains 7 bits of useful information.
 	 * The MSB is 0 if it is the last octet of the tag.
 	 */
-	for(val = 0, ((char *)ptr)++, skipped = 2;
-			skipped <= size; ((char *)ptr)++, skipped++) {
+	for(val = 0, ptr = ((char *)ptr) + 1, skipped = 2;
+			skipped <= size; ptr = ((char *)ptr) + 1, skipped++) {
 		unsigned int oct = *(uint8_t *)ptr;
 		if(oct & 0x80) {
 			val = (val << 7) | (oct & 0x7F);
diff --git a/skeletons/constr_CHOICE.c b/skeletons/constr_CHOICE.c
index 140e365..cec0b8a 100644
--- a/skeletons/constr_CHOICE.c
+++ b/skeletons/constr_CHOICE.c
@@ -31,7 +31,7 @@
  */
 #define	ADVANCE(num_bytes)	do {		\
 		size_t num = num_bytes;		\
-		(char *)ptr += num;		\
+		ptr = ((char *)ptr) + num;	\
 		size -= num;			\
 		if(ctx->left >= 0)		\
 			ctx->left -= num;	\
diff --git a/skeletons/constr_SEQUENCE.c b/skeletons/constr_SEQUENCE.c
index 87d5ab6..d1eb029 100644
--- a/skeletons/constr_SEQUENCE.c
+++ b/skeletons/constr_SEQUENCE.c
@@ -31,7 +31,7 @@
  */
 #define	ADVANCE(num_bytes)	do {		\
 		size_t num = num_bytes;		\
-		(char *)ptr += num;		\
+		ptr = ((char *)ptr) + num;	\
 		size -= num;			\
 		if(ctx->left >= 0)		\
 			ctx->left -= num;	\
diff --git a/skeletons/constr_SET.c b/skeletons/constr_SET.c
index ba42a4f..67816a7 100644
--- a/skeletons/constr_SET.c
+++ b/skeletons/constr_SET.c
@@ -37,7 +37,7 @@
  */
 #define	ADVANCE(num_bytes)	do {		\
 		size_t num = num_bytes;		\
-		(char *)ptr += num;		\
+		ptr = ((char *)ptr) + num;	\
 		size -= num;			\
 		if(ctx->left >= 0)		\
 			ctx->left -= num;	\
diff --git a/skeletons/constr_SET_OF.c b/skeletons/constr_SET_OF.c
index e0c898d..d8dadf5 100644
--- a/skeletons/constr_SET_OF.c
+++ b/skeletons/constr_SET_OF.c
@@ -31,7 +31,7 @@
  */
 #define	ADVANCE(num_bytes)	do {		\
 		size_t num = num_bytes;		\
-		(char *)ptr += num;		\
+		ptr = ((char *)ptr) + num;	\
 		size -= num;			\
 		if(ctx->left >= 0)		\
 			ctx->left -= num;	\