aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-08-25 01:34:11 +0000
committerLev Walkin <vlm@lionet.info>2004-08-25 01:34:11 +0000
commit4ce78cae9ec80c4285809de08a26c7df5258520a (patch)
tree9901eb4852901350f45c88f897b7650b4bc81e5e
parentc7d17be4587edfb4fb3d7d1f0b50f286aac311f9 (diff)
avoided compilation warnings on gcc 3.3.x systems
-rw-r--r--ChangeLog5
-rwxr-xr-xasn1c/tests/check-assembly.sh22
-rw-r--r--configure.in6
-rw-r--r--skeletons/BOOLEAN.c2
-rw-r--r--skeletons/INTEGER.c2
-rw-r--r--skeletons/NativeInteger.c2
-rw-r--r--skeletons/OBJECT_IDENTIFIER.c11
-rw-r--r--skeletons/OCTET_STRING.c10
-rw-r--r--skeletons/RELATIVE-OID.c4
-rw-r--r--skeletons/ber_decoder.c2
-rw-r--r--skeletons/ber_tlv_length.c6
-rw-r--r--skeletons/ber_tlv_tag.c4
-rw-r--r--skeletons/constr_CHOICE.c2
-rw-r--r--skeletons/constr_SEQUENCE.c2
-rw-r--r--skeletons/constr_SET.c2
-rw-r--r--skeletons/constr_SET_OF.c2
16 files changed, 36 insertions, 48 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ed31aa9..d6f4e773 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
+0.9.2: 2004-Aug-24
+
+ * Indirect references in constraints resolver code fixed.
+ * Avoided compilation warning on gcc 3.3.3 systems.
+
0.9.1: 2004-Aug-23
* Documentation updated: doc/asn1c-usage.pdf
diff --git a/asn1c/tests/check-assembly.sh b/asn1c/tests/check-assembly.sh
index 11571fc5..a0b0fdb1 100755
--- a/asn1c/tests/check-assembly.sh
+++ b/asn1c/tests/check-assembly.sh
@@ -43,26 +43,8 @@ CFLAGS=\${COMMON_FLAGS} ${CFLAGS}
CXXFLAGS=\${COMMON_FLAGS} ${CXXFLAGS}
all: check-executable
-check-executable: compiled-module object-files
- \$(CC) \$(CFLAGS) -o check-executable *.o
-
-# Cannot track dependencies automatically because files are not known beforehand
-object-files: *.c*
- @for sfile in *.c; do \\
- ofile=\`echo "\$\$sfile" | sed -e 's/\.c[c]*\$\$/.o/'\`; \\
- if [ "\$\$sfile" -nt "\$\$ofile" ]; then \\
- echo "\$(CC) \$(CFLAGS) -o \$\$ofile -c \$\$sfile"; \\
- \$(CC) \$(CFLAGS) -o \$\$ofile -c \$\$sfile; \\
- fi; \\
- done
- @for sfile in *.cc; do \\
- ofile=\`echo "\$\$sfile" | sed -e 's/\.c[c]*\$\$/.o/'\`; \\
- if [ "\$\$sfile" -nt "\$\$ofile" ]; then \\
- echo "\$(CXX) \$(CXXFLAGS) -o \$\$ofile -c \$\$sfile";\\
- \$(CXX) \$(CXXFLAGS) -o \$\$ofile -c \$\$sfile; \\
- fi; \\
- done
- @touch object-files
+check-executable: compiled-module *.c*
+ \$(CC) \$(CFLAGS) -o check-executable *.c*
# Compile the corresponding .asn1 spec.
compiled-module: ${asn_module} ../../asn1c
diff --git a/configure.in b/configure.in
index 894756ad..968bc2d9 100644
--- a/configure.in
+++ b/configure.in
@@ -3,7 +3,7 @@ AC_INIT(libasn1parser/asn1p_y.y)
AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
AC_PREREQ(2.53)
-AM_INIT_AUTOMAKE(asn1c, 0.9.1)
+AM_INIT_AUTOMAKE(asn1c, 0.9.2)
AC_SUBST(PATH)
@@ -40,14 +40,14 @@ AM_PROG_LEX
dnl *** Building mingw32 with cygwin compiler ***
case "$host_os" in
cygwin*)
- CFLAGS="$CFLAGS -DWIN32"
+ dnl CFLAGS="$CFLAGS -DWIN32"
case "$target" in
*mingw*)
CC="$CC -mno-cygwin"
esac
;;
mingw* | p32*)
- CFLAGS="$CFLAGS -DWIN32"
+ dnl CFLAGS="$CFLAGS -DWIN32"
;;
esac
diff --git a/skeletons/BOOLEAN.c b/skeletons/BOOLEAN.c
index da38772d..b0ae1786 100644
--- a/skeletons/BOOLEAN.c
+++ b/skeletons/BOOLEAN.c
@@ -61,7 +61,7 @@ BOOLEAN_decode_ber(asn1_TYPE_descriptor_t *td,
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 0c7a81af..16a6b74d 100644
--- a/skeletons/INTEGER.c
+++ b/skeletons/INTEGER.c
@@ -67,7 +67,7 @@ INTEGER_decode_ber(asn1_TYPE_descriptor_t *td,
/*
* 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 759fe27e..b0cc3b71 100644
--- a/skeletons/NativeInteger.c
+++ b/skeletons/NativeInteger.c
@@ -74,7 +74,7 @@ NativeInteger_decode_ber(asn1_TYPE_descriptor_t *td,
/*
* 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 4e6270db..fe209056 100644
--- a/skeletons/OBJECT_IDENTIFIER.c
+++ b/skeletons/OBJECT_IDENTIFIER.c
@@ -332,7 +332,7 @@ OBJECT_IDENTIFIER_get_arcs(OBJECT_IDENTIFIER_t *oid, void *arcs,
*(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 @@ OBJECT_IDENTIFIER_get_arcs(OBJECT_IDENTIFIER_t *oid, void *arcs,
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 @@ OBJECT_IDENTIFIER_set_arcs(OBJECT_IDENTIFIER_t *oid, void *arcs, unsigned int ar
*/
/* 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 @@ OBJECT_IDENTIFIER_set_arcs(OBJECT_IDENTIFIER_t *oid, void *arcs, unsigned int ar
/*
* 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 8ea360d5..6e0e426d 100644
--- a/skeletons/OCTET_STRING.c
+++ b/skeletons/OCTET_STRING.c
@@ -37,11 +37,11 @@ asn1_TYPE_descriptor_t asn1_DEF_OCTET_STRING = {
#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 3273ace5..252cc373 100644
--- a/skeletons/RELATIVE-OID.c
+++ b/skeletons/RELATIVE-OID.c
@@ -87,7 +87,7 @@ RELATIVE_OID_get_arcs(RELATIVE_OID_t *roid,
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 @@ RELATIVE_OID_set_arcs(RELATIVE_OID_t *roid, void *arcs, unsigned int arc_type_si
/*
* 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 0fd9b262..e56cc6a6 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 b3c1cebb..508bc39f 100644
--- a/skeletons/ber_tlv_length.c
+++ b/skeletons/ber_tlv_length.c
@@ -87,7 +87,7 @@ ber_skip_length(int _is_constructed, void *ptr, size_t size) {
* 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 @@ ber_skip_length(int _is_constructed, void *ptr, size_t size) {
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 @@ ber_skip_length(int _is_constructed, void *ptr, size_t size) {
&& ((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 d69ba31b..c0a0d6a6 100644
--- a/skeletons/ber_tlv_tag.c
+++ b/skeletons/ber_tlv_tag.c
@@ -30,8 +30,8 @@ ber_fetch_tag(void *ptr, size_t size, ber_tlv_tag_t *tag_r) {
* 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 140e365d..cec0b8aa 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 87d5ab66..d1eb0297 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 ba42a4ff..67816a77 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 e0c898da..d8dadf50 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; \