[esnacc-dev] [PATCH] self-references: revert changes done by DigitalNet

Aaron Conole aconole at bytheb.org
Wed Oct 12 13:39:48 UTC 2016


These changes were to drop particular compiler warnings.  However, modern
compilers have mechanisms to specify that particular variables are to be
considered 'unused'.  So, the self-assignment (which is undefined behavior)
is removed.

This doesn't remove all of the self-references, but it removes enough that
other warnings will start to be visible.  It is okay for future patches to
change the ABI, but for now they will stay.

Signed-off-by: Aaron Conole <aconole at bytheb.org>
---
 c-lib/src/asn-bool.c         |  30 ++---
 c-lib/src/asn-int.c          |   5 +-
 c-lib/src/asn-null.c         |  35 +++---
 c-lib/src/asn-oid.c          |  10 +-
 c-lib/src/asn-real.c         |   9 +-
 c-lib/src/asn-relative-oid.c |  16 +--
 c-lib/src/asn-tag.c          |  25 ++--
 compiler/core/do-macros.c    | 269 +++++++++++++------------------------------
 compiler/core/enc-rules.c    |   5 -
 compiler/core/err-chk.c      |  12 +-
 compiler/core/link-types.c   | 168 +++++++++------------------
 compiler/core/link-values.c  |  90 +++++----------
 compiler/core/normalize.c    |  11 +-
 compiler/core/print.c        | 125 ++++++--------------
 compiler/core/snacc.c        |   9 +-
 15 files changed, 258 insertions(+), 561 deletions(-)

diff --git a/c-lib/src/asn-bool.c b/c-lib/src/asn-bool.c
index f4a5106..a2bf19d 100644
--- a/c-lib/src/asn-bool.c
+++ b/c-lib/src/asn-bool.c
@@ -121,27 +121,24 @@ BEncAsnBoolContent PARAMS ((b, data),
 void
 BDecAsnBoolContent PARAMS ((b, tagId, len, result, bytesDecoded, env),
     GenBuf *b _AND_
-    AsnTag tagId _AND_
+    AsnTag tagId ESNACC_UNUSED _AND_
     AsnLen len _AND_
     AsnBool  *result _AND_
     AsnLen  *bytesDecoded _AND_
     jmp_buf env)
 {
-    if (len != 1)
-    {
-        Asn1Error ("BDecAsnBoolContent: ERROR - BOOLEAN length must be 1\n");
-        longjmp (env,-5);
+    if (len != 1) {
+        Asn1Error("BDecAsnBoolContent: ERROR - BOOLEAN length must be 1\n");
+        longjmp(env,-5);
     }
 
     (*bytesDecoded)++;
     *result = (unsigned char)(BufGetByte (b) != 0);
 
-    if (BufReadError (b))
-    {
-         Asn1Error ("BDecAsnBoolContent: ERROR - decoded past end of data\n");
-         longjmp (env, -6);
+    if (BufReadError(b)) {
+        Asn1Error("BDecAsnBoolContent: ERROR - decoded past end of data\n");
+        longjmp(env, -6);
     }
-    tagId = tagId;  /* referenced to avoid compiler warning. */
 }  /* BDecAsnBoolContent */
 
 /*
@@ -152,18 +149,15 @@ void
 PrintAsnBool PARAMS ((f, v, indent),
     FILE *f _AND_
     AsnBool *v _AND_
-    unsigned int indent)
+    unsigned int indent ESNACC_UNUSED)
 {
     if (*v)
-        fprintf (f, "TRUE");
+        fprintf(f, "TRUE");
     else
-        fprintf (f, "FALSE");
-    indent = indent ; /* referenced to avoid compiler warning. */
+        fprintf(f, "FALSE");
 }
 
-void FreeAsnBool PARAMS ((b), AsnBool* b) 
+void FreeAsnBool PARAMS ((b), AsnBool* b ESNACC_UNUSED)
 {
-    b=b;
-}
-
 
+}
diff --git a/c-lib/src/asn-int.c b/c-lib/src/asn-int.c
index 63e5abf..6fb5c74 100644
--- a/c-lib/src/asn-int.c
+++ b/c-lib/src/asn-int.c
@@ -414,10 +414,9 @@ void
 PrintUAsnInt PARAMS ((f, v, indent),
     FILE *f _AND_
     UAsnInt *v _AND_
-    unsigned int indent)
+    unsigned int indent ESNACC_UNUSED)
 {
-    fprintf (f, "%u", *v);
-    indent=indent;
+    fprintf(f, "%u", *v);
 }
 
 
diff --git a/c-lib/src/asn-null.c b/c-lib/src/asn-null.c
index 88e8858..96f18f9 100644
--- a/c-lib/src/asn-null.c
+++ b/c-lib/src/asn-null.c
@@ -73,14 +73,13 @@
 AsnLen
 BEncAsnNull PARAMS ((b, data),
     GenBuf *b _AND_
-    AsnNull *data)
+    AsnNull *data ESNACC_UNUSED)
 {
     AsnLen len;
 
-    len =  BEncAsnNullContent (b, data);
-    len += BEncDefLen (b, len);
-    len += BEncTag1 (b, UNIV, PRIM, NULLTYPE_TAG_CODE);
-    data=data;   /* referenced to avoid compiler warning. */
+    len =  BEncAsnNullContent(b, data);
+    len += BEncDefLen(b, len);
+    len += BEncTag1(b, UNIV, PRIM, NULLTYPE_TAG_CODE);
     return len;
 }  /* BEncAsnNull */
 
@@ -112,11 +111,11 @@ BDecAsnNull PARAMS ((b, result, bytesDecoded, env),
 
 void
 BDecAsnNullContent PARAMS ((b, tagId, len, result, bytesDecoded, env),
-    GenBuf *b _AND_
-    AsnTag tagId _AND_
+    GenBuf *b ESNACC_UNUSED _AND_
+    AsnTag tagId ESNACC_UNUSED _AND_
     AsnLen len _AND_
-    AsnNull *result _AND_
-    AsnLen *bytesDecoded _AND_
+    AsnNull *result ESNACC_UNUSED _AND_
+    AsnLen *bytesDecoded ESNACC_UNUSED _AND_
     jmp_buf env)
 {
     if (len != 0)
@@ -124,10 +123,6 @@ BDecAsnNullContent PARAMS ((b, tagId, len, result, bytesDecoded, env),
         Asn1Error ("BDecAsnNullContent: ERROR - NULL type's len must be 0\n");
         longjmp (env, -17);
     }
-    bytesDecoded=bytesDecoded;  /* referenced to avoid compiler warning. */
-    result=result;
-    tagId=tagId;
-    b=b;
 }  /* BDecAsnNullContent */
 
 /*
@@ -137,18 +132,14 @@ BDecAsnNullContent PARAMS ((b, tagId, len, result, bytesDecoded, env),
 void
 PrintAsnNull PARAMS ((f,v, indent),
     FILE *f _AND_
-    AsnNull *v _AND_
-    unsigned int indent)
+    AsnNull *v ESNACC_UNUSED _AND_
+    unsigned int indent ESNACC_UNUSED)
 {
-    fprintf (f, "NULL");
-    indent=indent;  /* referenced to avoid compiler warning. */
-    v=v;
+    fprintf(f, "NULL");
 }
 
 
-void FreeAsnNull PARAMS ((b), AsnNull *b) 
+void FreeAsnNull PARAMS ((b), AsnNull *b ESNACC_UNUSED)
 {
-    b=b;
-}
-
 
+}
diff --git a/c-lib/src/asn-oid.c b/c-lib/src/asn-oid.c
index 8f7df2f..a010ad6 100644
--- a/c-lib/src/asn-oid.c
+++ b/c-lib/src/asn-oid.c
@@ -115,7 +115,7 @@ BDecAsnOid PARAMS ((b, result, bytesDecoded, env),
 void
 BDecAsnOidContent PARAMS ((b, tagId, len, result, bytesDecoded, env),
     GenBuf *b _AND_
-    AsnTag tagId _AND_
+    AsnTag tagId ESNACC_UNUSED _AND_
     AsnLen len _AND_
     AsnOid *result _AND_
     AsnLen *bytesDecoded _AND_
@@ -136,7 +136,6 @@ BDecAsnOidContent PARAMS ((b, tagId, len, result, bytesDecoded, env),
          longjmp (env, -21);
     }
     (*bytesDecoded) += len;
-    tagId=tagId;  /* referenced to avoid compiler warning. */
 }  /* BDecAsnOidContent */
 
 
@@ -150,7 +149,7 @@ void
 PrintAsnOid PARAMS ((f,v, indent),
     FILE *f _AND_
     AsnOid *v _AND_
-    unsigned int indent)
+    unsigned int indent ESNACC_UNUSED)
 {
     unsigned int firstArcNum;
     unsigned int arcNum;
@@ -170,8 +169,7 @@ PrintAsnOid PARAMS ((f,v, indent),
 
     fprintf (f,"%u %u", (unsigned int)firstArcNum, arcNum - (firstArcNum * 40));
 
-    for (; i < (int)(v->octetLen); )
-    {
+    for (; i < (int)(v->octetLen);) {
         for (arcNum = 0; (i < (int)(v->octetLen)) && (v->octs[i] & 0x80);i++)
             arcNum = (arcNum << 7) + (v->octs[i] & 0x7f);
 
@@ -180,8 +178,6 @@ PrintAsnOid PARAMS ((f,v, indent),
         fprintf (f," %u", arcNum);
     }
     fprintf (f,"}");
-    indent=indent; /* referenced to avoid compiler warning. */
-
 } /* PrintAsnOid */
 
 
diff --git a/c-lib/src/asn-real.c b/c-lib/src/asn-real.c
index 27a8369..015c423 100644
--- a/c-lib/src/asn-real.c
+++ b/c-lib/src/asn-real.c
@@ -770,7 +770,7 @@ BEncAsnRealContent PARAMS ((b, value),
 void
 BDecAsnRealContent PARAMS ((b, tagId, len, result, bytesDecoded, env),
     GenBuf *b _AND_
-    AsnTag    tagId _AND_
+    AsnTag    tagId ESNACC_UNUSED _AND_
     AsnLen    len _AND_
     AsnReal  *result _AND_
     AsnLen *bytesDecoded _AND_
@@ -895,8 +895,6 @@ BDecAsnRealContent PARAMS ((b, tagId, len, result, bytesDecoded, env),
             longjmp (env, -24);
         }
     }
-    tagId = tagId;  /* referenced to avoid compiler warning. */
-
 }  /* BDecAsnRealContent */
 
 
@@ -908,8 +906,7 @@ void
 PrintAsnReal PARAMS ((f, v, indent),
     FILE *f _AND_
     AsnReal *v _AND_
-    unsigned int indent)
+    unsigned int indent ESNACC_UNUSED)
 {
-    fprintf (f, "%.17E", *v);
-    indent = indent; /* referenced to avoid compiler warning. */
+    fprintf(f, "%.17E", *v);
 }
diff --git a/c-lib/src/asn-relative-oid.c b/c-lib/src/asn-relative-oid.c
index c5a0698..5f48d9f 100644
--- a/c-lib/src/asn-relative-oid.c
+++ b/c-lib/src/asn-relative-oid.c
@@ -74,7 +74,7 @@ BDecAsnRelativeOid PARAMS ((b, result, bytesDecoded, env),
 void
 BDecAsnRelativeOidContent PARAMS ((b, tagId, len, result, bytesDecoded, env),
     GenBuf *b _AND_
-    AsnTag tagId _AND_
+    AsnTag tagId ESNACC_UNUSED _AND_
     AsnLen len _AND_
     AsnRelativeOid *result _AND_
     AsnLen *bytesDecoded _AND_
@@ -95,7 +95,6 @@ BDecAsnRelativeOidContent PARAMS ((b, tagId, len, result, bytesDecoded, env),
          longjmp (env, -21);
     }
     (*bytesDecoded) += len;
-    tagId=tagId;  /* referenced to avoid compiler warning. */
 }  /* BDecAsnRelativeOidContent */
 
 
@@ -109,25 +108,22 @@ void
 PrintAsnRelativeOid PARAMS ((f,v, indent),
     FILE *f _AND_
     AsnRelativeOid *v _AND_
-    unsigned int indent)
+    unsigned int indent ESNACC_UNUSED)
 {
     unsigned int arcNum;
     int i;
 
-    fprintf (f,"{");
+    fprintf(f,"{");
 
-    for (i = 0; i < (int)(v->octetLen); )
-    {
+    for (i = 0; i < (int)(v->octetLen); ) {
         for (arcNum = 0; (i < (int)(v->octetLen)) && (v->octs[i] & 0x80);i++)
             arcNum = (arcNum << 7) + (v->octs[i] & 0x7f);
 
         arcNum = (arcNum << 7) + (v->octs[i] & 0x7f);
         i++;
-        fprintf (f," %u", arcNum);
+        fprintf(f," %u", arcNum);
     }
-    fprintf (f,"}");
-    indent=indent; /* referenced to avoid compiler warning. */
-
+    fprintf(f,"}");
 } /* PrintAsnRelativeOid */
 
 
diff --git a/c-lib/src/asn-tag.c b/c-lib/src/asn-tag.c
index 7d1a866..1adc9dd 100644
--- a/c-lib/src/asn-tag.c
+++ b/c-lib/src/asn-tag.c
@@ -74,42 +74,39 @@ BDecTag PARAMS ((b, bytesDecoded, env),
 {
     AsnTag tagId;
     AsnTag tmpTagId;
-    int i;
+    unsigned int i;
 
-    tagId = ((AsnTag)BufGetByte (b)) << ((sizeof (AsnTag)-1)*8);
+    tagId = ((AsnTag)BufGetByte (b)) << ((sizeof(AsnTag)-1)*8);
     (*bytesDecoded)++;
 
     /* check if long tag format (ie code > 31) */
-    if ((tagId & (((AsnTag) 0x1f) << ((sizeof (AsnTag)-1)*8))) == (((AsnTag)0x1f) << ((sizeof (AsnTag)-1)*8)))
+    if ((tagId & (((AsnTag) 0x1f) << ((sizeof(AsnTag)-1)*8))) ==
+        (((AsnTag)0x1f) << ((sizeof(AsnTag)-1)*8)))
     {
         i = 2;
         do
         {
-            tmpTagId = (AsnTag) BufGetByte (b);
-            tagId |= (tmpTagId << ((sizeof (AsnTag)-i)*8));
+            tmpTagId = (AsnTag) BufGetByte(b);
+            tagId |= (tmpTagId << ((sizeof(AsnTag)-i)*8));
             (*bytesDecoded)++;
             i++;
-        }
-        while ((tmpTagId & (AsnTag)0x80) && (i <= sizeof (AsnTag)));
+        }while ((tmpTagId & (AsnTag)0x80) && (i <= sizeof(AsnTag)));
 
         /*
          * check for tag that is too long
          */
-        if (i > (sizeof (AsnTag)+1))
-        {
+        if (i > (sizeof (AsnTag)+1)) {
             Asn1Error ("BDecTag: ERROR - tag value overflow\n");
             longjmp (env, -25);
         }
     }
 
-    if (BufReadError (b))
-    {
-        Asn1Error ("BDecTag: ERROR - decoded past the end of data\n");
-        longjmp (env, -26);
+    if (BufReadError(b)) {
+        Asn1Error("BDecTag: ERROR - decoded past the end of data\n");
+        longjmp(env, -26);
     }
 
     return tagId;
-
 }  /* BDecTag */
 
 
diff --git a/compiler/core/do-macros.c b/compiler/core/do-macros.c
index de9af49..687a0e7 100644
--- a/compiler/core/do-macros.c
+++ b/compiler/core/do-macros.c
@@ -434,7 +434,7 @@ ProcessMacrosInBasicType PARAMS ((m,td,type,bt, v),
 void
 DefineType PARAMS ((m, td, t, name),
     Module *m _AND_
-    TypeDef *td _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
     Type *t _AND_
     char *name)
 {
@@ -480,7 +480,6 @@ DefineType PARAMS ((m, td, t, name),
        t->basicType->a.localTypeRef->link = newDef;
        t->basicType->a.localTypeRef->module = m;
        t->basicType->a.localTypeRef->typeName = newDef->definedName;
-       td = td;    /*AVOIDS compiler warning.*/
 
     }
 } /* DefineType */
@@ -490,8 +489,8 @@ void
 ProcessRosOperationMacroType PARAMS ((m, td, t, bt, op, v),
     Module *m _AND_
     TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosOperationMacroType *op _AND_
     ValueDef *v)
 {
@@ -503,8 +502,6 @@ ProcessRosOperationMacroType PARAMS ((m, td, t, bt, op, v),
 
     if (op->result != NULL)
         DefineType (m, td, op->result->type, v->definedName);
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
 }  /* ProcessRosOperationMacroType */
 
 
@@ -513,8 +510,8 @@ void
 ProcessRosErrorMacroType PARAMS ((m, td, t, bt, err, v),
     Module *m _AND_
     TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosErrorMacroType *err _AND_
     ValueDef *v)
 {
@@ -523,9 +520,6 @@ ProcessRosErrorMacroType PARAMS ((m, td, t, bt, err, v),
 
     if ((err != NULL) && (err->parameter != NULL))
         DefineType (m, td, err->parameter->type, v->definedName);
-
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
 }   /* ProcessRosErrorMacroType */
 
 
@@ -533,8 +527,8 @@ void
 ProcessRosBindMacroType PARAMS ((m, td, t, bt, bind, v),
     Module *m _AND_
     TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosBindMacroType *bind _AND_
     ValueDef *v)
 {
@@ -547,220 +541,153 @@ ProcessRosBindMacroType PARAMS ((m, td, t, bt, bind, v),
         DefineType (m, td, bind->result->type, v->definedName);
         DefineType (m, td, bind->error->type, v->definedName);
     }
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
 }   /* ProcessRosBindMacroType */
 
 
 void
 ProcessRosAseMacroType PARAMS ((m, td, t, bt, ase, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    RosAseMacroType *ase _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    RosAseMacroType *ase ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    td = td;
-    m = m;
-    ase = ase;
-    v = v;     /*AVOIDS compiler warning.*/
+
 }  /* ProcessRosAseMacroType */
 
 
 
 void
 ProcessRosAcMacroType PARAMS ((m, td, t, bt, ac, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    RosAcMacroType *ac  _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    RosAcMacroType *ac ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
 
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    v = v;
-    ac = ac;
-    td = td;
-    m = m;
 }  /* ProcessRosAcMacroType */
 
 
 
 void
 ProcessMtsasExtensionsMacroType PARAMS ((m, td, t, bt, exts, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    MtsasExtensionsMacroType *exts _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    MtsasExtensionsMacroType *exts ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    td = td;
-    m = m;
-    exts = exts;
-    v = v;     /*AVOIDS compiler warning.*/
+
 }  /* ProcessMtsasExtensionsMacroType */
 
 
 void
 ProcessMtsasExtensionMacroType PARAMS ((m, td, t, bt, ext, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    MtsasExtensionMacroType *ext _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    MtsasExtensionMacroType *ext ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
 
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    td = td;
-    m = m;
-    v = v;
-    ext = ext;
 }  /* ProcessMtsasExtensionMacroType */
 
 
 void
 ProcessMtsasExtensionAttributeMacroType PARAMS ((m, td, t, bt, ext, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    MtsasExtensionAttributeMacroType *ext _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    MtsasExtensionAttributeMacroType *ext ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
 
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    td = td;
-    m = m;
-    v = v;
-    ext = ext;
 }  /* ProcessMtsasExtensionAttributeMacroType */
 
 
 void
 ProcessMtsasTokenMacroType PARAMS ((m, td, t, bt, tok, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    MtsasTokenMacroType *tok _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    MtsasTokenMacroType *tok ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
 
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    td = td;
-    m = m;
-    v = v;
-    tok = tok;
 }  /* ProcessMtsasTokenMacroType */
 
 
 void
 ProcessMtsasTokenDataMacroType PARAMS ((m, td, t, bt, tok, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    MtsasTokenDataMacroType *tok _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    MtsasTokenDataMacroType *tok ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
 
-
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    td = td;
-    m = m;
-    v = v;
-    tok = tok;
 }  /* ProcessMtsasTokenDataMacroType */
 
 
 void
 ProcessMtsasSecurityCategoryMacroType PARAMS ((m, td, t, bt, sec, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    MtsasSecurityCategoryMacroType *sec _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    MtsasSecurityCategoryMacroType *sec ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
 
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    td = td;
-    m = m;
-    v = v;
-    sec = sec;
 }  /* ProcessMtsasSecurityCategoryMacroType */
 
 
 
 void
 ProcessAsnObjectMacroType PARAMS ((m, td, t, bt, obj, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    AsnObjectMacroType *obj _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    AsnObjectMacroType *obj ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
 
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    td = td;
-    m = m;
-    v = v ;
-    obj = obj;
 }  /* ProcessAsnObjectMacroType */
 
 
 void
 ProcessAsnPortMacroType PARAMS ((m, td, t, bt, p, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    AsnPortMacroType *p _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    AsnPortMacroType *p ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
 
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    td = td;
-    m  = m;
-    v = v;
-    p = p;
 }  /* ProcessAsnPortMacroType */
 
 
 
 void
 ProcessAsnAbstractBindMacroType PARAMS ((m, td, t, bt, bind, v),
-    Module *m _AND_
-    TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
-    AsnAbstractBindMacroType *bind _AND_
-    ValueDef *v)
+    Module *m ESNACC_UNUSED _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
+    AsnAbstractBindMacroType *bind ESNACC_UNUSED _AND_
+    ValueDef *v ESNACC_UNUSED)
 {
 
-    bt = bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    td = td;
-    m = m;
-    v = v;
-    bind = bind;
 }  /* ProcessAsnBindMacroType */
 
 
@@ -768,12 +695,11 @@ void
 ProcessSnmpObjectTypeMacroType  PARAMS ((m, td, t, bt, ot, v),
     Module *m _AND_
     TypeDef *td _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     SnmpObjectTypeMacroType *ot _AND_
     ValueDef *v)
 {
-    NamedType *nt = NULL;
     char anyId[256];
     AnyRefList **arlHndl;
 
@@ -806,11 +732,6 @@ ProcessSnmpObjectTypeMacroType  PARAMS ((m, td, t, bt, ot, v),
     else
         AddAnyRefByInt (arlHndl, anyId, v->value->basicValue->a.integer);
 
-/* REN -- 1/12/98 -- Also need to add a reference to the global ref table
-for importTypeRefs since GetAnyRefListHndl() and 
-AddAnyRefByInt() only adds the ref to the Type (basic or localTypeRef).  
-Note:  For imported Types, GetAnyRefListHndl() will never return a handle 
-into the global ref table. */
 	
 	/* Only add this type if it's an importTypeRef  */
     if ((ot->syntax != NULL) && 
@@ -822,40 +743,4 @@ into the global ref table. */
 		else
 			AddAnyRefByInt (arlHndl, anyId, v->value->basicValue->a.integer);
 	}
-/* REN -- end */
-
-    /* make a choice with all the object type elmts */
-    /*   USING THE ANY HASH TABLE NOW
-    if (snmpObjectSyntaxesG == NULL)
-    {
-        snmpObjectSyntaxesG = (TypeDef*) Malloc (sizeof (TypeDef));
-        SetupType (&snmpObjectSyntaxesG->type, BASICTYPE_CHOICE, 0);
-        snmpObjectSyntaxesG->type->basicType->a.choice =
-            AsnListNew (sizeof (void*));
-        snmpObjectSyntaxesG->definedName = "SnmpOpaqueTypes";
-
-    }
-    */
-
-    /*  NOT DONE ANYMORE
-     * make each field in the choice the same as the object
-     * types SYNTAX field type (adjusted by Define type)
-     * make choice field name same as OBJ-TYPE value Defs name
-     *
-     * NOTE - using ptrs to type/fieldname, not duplicating them
-     * this may cause freeing probs
-     */
-    /*
-    nt = MT (NamedType);
-    nt->fieldName = v->definedName;
-    nt->type = ot->syntax;
-
-    tmpNtHndl = (NamedType**)
-        AsnListAppend (snmpObjectSyntaxesG->type->basicType->a.choice);
-    *tmpNtHndl = nt;
-    */
-    bt=bt;     /*AVOIDS compiler warning.*/
-    t = t;
-    nt = nt;
-
 }  /* ProcessSnmpObjectTypeMacro */
diff --git a/compiler/core/enc-rules.c b/compiler/core/enc-rules.c
index 96a0a8d..fe5b867 100644
--- a/compiler/core/enc-rules.c
+++ b/compiler/core/enc-rules.c
@@ -27,11 +27,6 @@
  *
  */
 
-#if !defined(lint)
-static const char rcsid[] = "@(#)$RCSfile: enc-rules.c,v $ $Revision: 1.2 $";
-#endif
-
-
 /*
  * Local file includes
  */
diff --git a/compiler/core/err-chk.c b/compiler/core/err-chk.c
index b38014d..7ebbf3d 100644
--- a/compiler/core/err-chk.c
+++ b/compiler/core/err-chk.c
@@ -663,9 +663,9 @@ ErrChkValueDef PARAMS ((m, vd),
 
 void
 ErrChkValue PARAMS ((m, vd, v),
-    Module *m _AND_
-    ValueDef *vd _AND_
-    Value *v)
+    Module *m ESNACC_UNUSED _AND_
+    ValueDef *vd ESNACC_UNUSED _AND_
+    Value *v ESNACC_UNUSED)
 {
 
 }
@@ -779,7 +779,7 @@ AddFirstTag PARAMS ((definedTags, t),
         /*
          * if untagged choice and no tags found yet
          */
-        else if ((t->basicType->choiceId == BASICTYPE_CHOICE))
+        else if (t->basicType->choiceId == BASICTYPE_CHOICE)
         {
             /*
              * add top level tags from each choice elmt
@@ -1018,7 +1018,7 @@ ChkNamedBits PARAMS ((m, t, n),
 void
 ChkSeqTags PARAMS ((m, td, t),
     Module *m _AND_
-    TypeDef *td _AND_
+    TypeDef *td ESNACC_UNUSED _AND_
     Type *t)
 {
     DefinedObj *dO;
@@ -1053,6 +1053,4 @@ ChkSeqTags PARAMS ((m, td, t),
         }
     }
     FreeDefinedObjs (&dO);
-    td = td;     /* AVOIDS Compiler warnings.*/
-
 }  /* ChkSeqTags */
diff --git a/compiler/core/link-types.c b/compiler/core/link-types.c
index 694ca0e..ad3a11c 100644
--- a/compiler/core/link-types.c
+++ b/compiler/core/link-types.c
@@ -454,7 +454,7 @@ void	// Deepak: 04/Mar/2003
 TypeLinkObjectAssignmentField PARAMS ((m, currMod, head, field),
     ModuleList *m _AND_
     Module *currMod _AND_
-	ObjectAssignment *head _AND_
+	ObjectAssignment *head ESNACC_UNUSED _AND_
     ObjectAssignmentField *field)
 {
 	TypeOrValue *tOrV;
@@ -467,51 +467,45 @@ TypeLinkObjectAssignmentField PARAMS ((m, currMod, head, field),
         TypeLinkType (m, currMod, NULL, tOrV->a.type);
     else
         TypeLinkValue (m, currMod, NULL, NULL, tOrV->a.value);
-	head = head;	// avoids warning
 }
 
 void	// Deepak: 04/Mar/2003
 TypeLinkObjectSetAssignments PARAMS ((m, currMod, head),
-    ModuleList *m _AND_
+    ModuleList *m ESNACC_UNUSED _AND_
     Module *currMod _AND_
     ObjectSetAssignment *head)
 {
-	TypeOrValue *tOrV;
+    TypeOrValue *tOrV;
     TypeDef *tmpTypeDef;
-	ObjectAssignment *oa;
+    ObjectAssignment *oa;
 
-	if (head == NULL)
+    if (head == NULL)
         return;
 
-	// chk here objClassName CLASS exists or not.
-	tmpTypeDef = LookupType (currMod->typeDefs, head->objectClassName);
-	if(tmpTypeDef)		// CLASS is defined
-	{
-		tmpTypeDef->localRefCount++;		// CLASS is referenced here
-		head->objectClassDefLink = tmpTypeDef->type->basicType->a.objectclass;	// Deepak: 26/Mar/2003
-	}
-	else		// CLASS is not defined
-	{
-		currMod->status = MOD_ERROR;
-		PrintErrLoc (currMod->asn1SrcFileName, (long)head->lineNo);
-		fprintf (errFileG, "ERROR - CLASS \"%s\" is referenced but not defined.\n",
-			head->objectClassName);
-	}
-
-	// then chk each object exists or not.
-	FOR_EACH_LIST_ELMT (tOrV, head->objectNameList)
-	{
-		oa = LookupObjectClassObjectAssignment(currMod->objAssignments, tOrV->a.value->basicValue->a.namedValue->fieldName);
-		tOrV->a.value->basicValue->a.objAssignment = oa;
-		tOrV->a.value->basicValue->a.localValueRef->module = currMod;
-	}
+    // chk here objClassName CLASS exists or not.
+    tmpTypeDef = LookupType (currMod->typeDefs, head->objectClassName);
+    if (tmpTypeDef) {
+        tmpTypeDef->localRefCount++;		// CLASS is referenced here
+        head->objectClassDefLink = tmpTypeDef->type->basicType->a.objectclass;
+    } else {
+        currMod->status = MOD_ERROR;
+        PrintErrLoc (currMod->asn1SrcFileName, (long)head->lineNo);
+        fprintf(errFileG,
+                "ERROR - CLASS \"%s\" is referenced but not defined.\n",
+                head->objectClassName);
+    }
 
-	//TypeLinkObjectAssignmentField (m, currMod, head, head->type);
-	m = m; // avoids warning
+    // then chk each object exists or not.
+    FOR_EACH_LIST_ELMT (tOrV, head->objectNameList) {
+        oa = LookupObjectClassObjectAssignment
+            (currMod->objAssignments,
+             tOrV->a.value->basicValue->a.namedValue->fieldName);
+        tOrV->a.value->basicValue->a.objAssignment = oa;
+        tOrV->a.value->basicValue->a.localValueRef->module = currMod;
+    }
 }  /* LinkTypeDef */
 
 
-
 /*
  * given a type def, it goes through the entire typedef
  * (aggregate parts if any) and links refs
@@ -1103,7 +1097,7 @@ TypeLinkBasicType PARAMS ((m, currMod, head, type, bt),
  */
 void
 TypeLinkWithSyntaxes PARAMS ((m, currMod, head, ocd),
-    ModuleList *m _AND_
+    ModuleList *m ESNACC_UNUSED _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
 	ObjectClassDef *ocd)
@@ -1148,7 +1142,6 @@ TypeLinkWithSyntaxes PARAMS ((m, currMod, head, ocd),
 			}
 		}
 	}
-	m=m; // avoids warning
 }	/* TypeLinkWithSyntaxes */
 
 
@@ -1279,8 +1272,8 @@ void
 TypeLinkNamedElmts PARAMS ((m, currMod, head, t, v),
     ModuleList *m _AND_
     Module *currMod _AND_
-    TypeDef *head _AND_
-    Type *t _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
     ValueDefList *v)
 {
     ValueDef *vd;
@@ -1288,8 +1281,6 @@ TypeLinkNamedElmts PARAMS ((m, currMod, head, t, v),
     {
         TypeLinkValue (m, currMod, vd, vd->value->type, vd->value);
     }
-    t = t;  /* AVOIDS compiler warning.*/
-    head = head;
 }  /* TypeLinkNamedElmts */
 
 
@@ -1327,9 +1318,9 @@ TypeLinkValueDef PARAMS ((m, currMod, v),
  */
 void
 TypeLinkValue PARAMS ((m, currMod, head, valuesType, v),
-    ModuleList *m _AND_
-    Module *currMod _AND_
-    ValueDef *head _AND_
+    ModuleList *m ESNACC_UNUSED _AND_
+    Module *currMod ESNACC_UNUSED _AND_
+    ValueDef *head ESNACC_UNUSED _AND_
     Type *valuesType _AND_
     Value *v)
 {
@@ -1338,13 +1329,9 @@ TypeLinkValue PARAMS ((m, currMod, head, valuesType, v),
         return;
 
     v->type = valuesType;
-/*    TypeLinkType (m, currMod, NULL, v->typeRef); */
 
     if ((v->valueType == BASICTYPE_UNKNOWN) && (valuesType != NULL))
         v->valueType = valuesType->basicType->choiceId;
-    head = head;   /* AVOIDS compiler warning.*/
-    currMod = currMod;
-    m = m;
 }  /* TypeLinkValue */
 
 
@@ -1357,7 +1344,7 @@ TypeLinkRosOperationMacroType PARAMS ((m, currMod, head, t, bt, op),
     Module *currMod _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosOperationMacroType *op)
 {
     TypeOrValue *tOrV;
@@ -1390,7 +1377,6 @@ TypeLinkRosOperationMacroType PARAMS ((m, currMod, head, t, bt, op),
         else
             TypeLinkValue (m, currMod, NULL, t, tOrV->a.value);
     }
-    bt = bt; /*AVOIDS Compiler warning.*/
 }  /* TypeLinkRosOperationMacroType */
 
 
@@ -1402,16 +1388,14 @@ TypeLinkRosErrorMacroType PARAMS ((m, currMod, head, t, bt, err),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosErrorMacroType *err)
 {
     if ((err != NULL) && (err->parameter != NULL))
     {
         TypeLinkType (m, currMod, head, err->parameter->type);
     }
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }   /* TypeLinkRosErrorMacroType */
 
 /*
@@ -1422,8 +1406,8 @@ TypeLinkRosBindMacroType PARAMS ((m, currMod, head, t, bt, bind),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosBindMacroType *bind)
 {
     if (bind != NULL)
@@ -1432,8 +1416,6 @@ TypeLinkRosBindMacroType PARAMS ((m, currMod, head, t, bt, bind),
         TypeLinkElmtType (m, currMod, head, bind->result);
         TypeLinkElmtType (m, currMod, head, bind->error);
     }
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }   /* TypeLinkRosBindMacroType */
 
 
@@ -1445,8 +1427,8 @@ TypeLinkRosAseMacroType PARAMS ((m, currMod, head, t, bt, ase),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosAseMacroType *ase)
 {
     Value *v;
@@ -1462,9 +1444,6 @@ TypeLinkRosAseMacroType PARAMS ((m, currMod, head, t, bt, ase),
     FOR_EACH_LIST_ELMT (v, ase->supplierInvokes)
         TypeLinkValue (m, currMod, NULL, t, v);
 
-    bt = bt; /*AVOIDS Compiler warning.*/
-    head = head;
-
 }  /* TypeLinkRosAseMacroType */
 
 
@@ -1475,18 +1454,16 @@ void
 TypeLinkRosAcMacroType PARAMS ((m, currMod, head, t, bt, ac),
     ModuleList *m _AND_
     Module *currMod _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosAcMacroType *ac)
 {
     Value *v;
-    /*OID *oid; */
 
     FOR_EACH_LIST_ELMT (v,  ac->nonRoElements)
         TypeLinkValue (m, currMod, NULL, t, v);
 
-
     TypeLinkType (m, currMod, head, ac->bindMacroType);
     TypeLinkType (m, currMod, head, ac->unbindMacroType);
 
@@ -1501,8 +1478,6 @@ TypeLinkRosAcMacroType PARAMS ((m, currMod, head, t, bt, ac),
     FOR_EACH_LIST_ELMT (v, ac->responderConsumerOf)
         TypeLinkValue (m, currMod, NULL, t, v);
 
-    bt = bt; /*AVOIDS Compiler warning.*/
-    head = head;
 }  /* TypeLinkRosAcMacroType */
 
 
@@ -1513,9 +1488,9 @@ void
 TypeLinkMtsasExtensionsMacroType PARAMS ((m, currMod, head, t, bt, exts),
     ModuleList *m _AND_
     Module *currMod _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasExtensionsMacroType *exts)
 {
     Value *v;
@@ -1523,8 +1498,6 @@ TypeLinkMtsasExtensionsMacroType PARAMS ((m, currMod, head, t, bt, exts),
     FOR_EACH_LIST_ELMT (v, exts->extensions)
         TypeLinkValue (m, currMod, NULL, t, v);
 
-    bt= bt; /*AVOIDS Compiler warning.*/
-    head = head;
 }  /* TypeLinkMtsasExtensionsMacroType */
 
 
@@ -1537,13 +1510,11 @@ TypeLinkMtsasExtensionMacroType PARAMS ((m, currMod, head, t, bt, ext),
     Module *currMod _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasExtensionMacroType *ext)
 {
     TypeLinkElmtType (m, currMod, head, ext->elmtType);
     TypeLinkValue (m, currMod, NULL, t, ext->defaultValue);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
 }  /* TypeLinkMtsasExtensionMacroType */
 
 
@@ -1555,16 +1526,12 @@ TypeLinkMtsasExtensionAttributeMacroType PARAMS ((m, currMod, head, t, bt, ext),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasExtensionAttributeMacroType *ext)
 {
-
     if (ext != NULL)
         TypeLinkType (m, currMod, head, ext->type);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }  /* TypeLinkMtsasExtensionAttributeMacroType */
 
 /*
@@ -1575,16 +1542,12 @@ TypeLinkMtsasTokenMacroType PARAMS ((m, currMod, head, t, bt, tok),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasTokenMacroType *tok)
 {
     if (tok != NULL)
         TypeLinkType (m, currMod, head, tok->type);
-
-    bt = bt
-	    ; /*AVOIDS Compiler warning.*/
-    t = t;
 }  /* TypeLinkMtsasTokenMacroType */
 
 /*
@@ -1595,15 +1558,12 @@ TypeLinkMtsasTokenDataMacroType PARAMS ((m, currMod, head, t, bt, tok),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasTokenDataMacroType *tok)
 {
     if (tok != NULL)
         TypeLinkType (m, currMod, head, tok->type);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }  /* TypeLinkMtsasTokenDataMacroType */
 
 /*
@@ -1614,16 +1574,12 @@ TypeLinkMtsasSecurityCategoryMacroType PARAMS ((m, currMod, head, t, bt, sec),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasSecurityCategoryMacroType *sec)
 {
-
     if (sec != NULL)
         TypeLinkType (m, currMod, head, sec->type);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }  /* TypeLinkMtsasSecurityCategoryMacroType */
 
 
@@ -1634,18 +1590,15 @@ void
 TypeLinkAsnObjectMacroType PARAMS ((m, currMod, head, t, bt, obj),
     ModuleList *m _AND_
     Module *currMod _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     AsnObjectMacroType *obj)
 {
     AsnPort *ap;
 
     FOR_EACH_LIST_ELMT (ap, obj->ports)
         TypeLinkValue (m, currMod, NULL, t, ap->portValue);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
-    head = head;
 }  /* TypeLinkAsnObjectMacroType */
 
 /*
@@ -1657,7 +1610,7 @@ TypeLinkAsnPortMacroType PARAMS ((m, currMod, head, t, bt, p),
     Module *currMod _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     AsnPortMacroType *p)
 {
     TypeOrValue *tOrV;
@@ -1687,8 +1640,6 @@ TypeLinkAsnPortMacroType PARAMS ((m, currMod, head, t, bt, p),
         else
             TypeLinkValue (m, currMod, NULL, t, tOrV->a.value);
     }
-
-    bt = bt; /*AVOIDS Compiler warning.*/
 }  /* TypeLinkAsnPortMacroType */
 
 
@@ -1699,18 +1650,15 @@ void
 TypeLinkAsnAbstractBindMacroType PARAMS ((m, currMod, head, t, bt, bind),
     ModuleList *m _AND_
     Module *currMod _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     AsnAbstractBindMacroType *bind)
 {
     AsnPort *ap;
 
     FOR_EACH_LIST_ELMT (ap, bind->ports)
         TypeLinkValue (m, currMod, NULL, t, ap->portValue);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
-    head = head;
 }  /* TypeLinkAsnBindMacroType */
 
 
@@ -1723,7 +1671,7 @@ TypeLinkSnmpObjectTypeMacroType PARAMS ((m, currMod, head, t, bt, ot),
     Module *currMod _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     SnmpObjectTypeMacroType *ot)
 {
     TypeOrValue *tOrV;
@@ -1740,6 +1688,4 @@ TypeLinkSnmpObjectTypeMacroType PARAMS ((m, currMod, head, t, bt, ot),
         else
             TypeLinkValue (m, currMod, NULL, t, tOrV->a.value);
     }
-
-    bt = bt; /*AVOIDS Compiler warning.*/
 }  /* TypeLinkSnmpObjectTypeMacroType */
diff --git a/compiler/core/link-values.c b/compiler/core/link-values.c
index ab9d6d1..0851c0d 100644
--- a/compiler/core/link-values.c
+++ b/compiler/core/link-values.c
@@ -619,8 +619,8 @@ void
 ValueLinkNamedElmts PARAMS ((m, currMod, head, t, v),
     ModuleList *m _AND_
     Module *currMod _AND_
-    TypeDef *head _AND_
-    Type *t _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
     ValueDefList *v)
 {
     ValueDef *vd;
@@ -628,9 +628,6 @@ ValueLinkNamedElmts PARAMS ((m, currMod, head, t, v),
     {
         ValueLinkValue (m, currMod, vd, vd->value->type, vd->value);
     }
-
-    t = t; /*AVOIDS Compiler warning.*/
-    head = head;
 }  /* ValueLinkNamedElmts */
 
 
@@ -944,7 +941,7 @@ ValueLinkRosOperationMacroType PARAMS ((m, currMod, head, t, bt, op),
     Module *currMod _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosOperationMacroType *op)
 {
     TypeOrValue *tOrV;
@@ -977,8 +974,6 @@ ValueLinkRosOperationMacroType PARAMS ((m, currMod, head, t, bt, op),
         else
             ValueLinkValue (m, currMod, NULL, t, tOrV->a.value);
     }
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }  /* ValueLinkRosOperationMacroType */
 
 
@@ -987,16 +982,14 @@ ValueLinkRosErrorMacroType PARAMS ((m, currMod, head, t, bt, err),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosErrorMacroType *err)
 {
     if ((err != NULL) && (err->parameter != NULL))
     {
         ValueLinkType (m, currMod, head, err->parameter->type);
     }
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }   /* ValueLinkRosErrorMacroType */
 
 
@@ -1005,8 +998,8 @@ ValueLinkRosBindMacroType PARAMS ((m, currMod, head, t, bt, bind),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosBindMacroType *bind)
 {
     if (bind != NULL)
@@ -1015,8 +1008,6 @@ ValueLinkRosBindMacroType PARAMS ((m, currMod, head, t, bt, bind),
         ValueLinkElmtType (m, currMod, head, bind->result);
         ValueLinkElmtType (m, currMod, head, bind->error);
     }
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }   /* ValueLinkRosBindMacroType */
 
 
@@ -1024,9 +1015,9 @@ void
 ValueLinkRosAseMacroType PARAMS ((m, currMod, head, t, bt, ase),
     ModuleList *m _AND_
     Module *currMod _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosAseMacroType *ase)
 {
     Value *v;
@@ -1042,8 +1033,6 @@ ValueLinkRosAseMacroType PARAMS ((m, currMod, head, t, bt, ase),
     FOR_EACH_LIST_ELMT (v, ase->supplierInvokes)
         ValueLinkValue (m, currMod, NULL, t, v);
 
-    bt = bt; /*AVOIDS Compiler warning.*/
-    head = head;
 }  /* ValueLinkRosAseMacroType */
 
 
@@ -1054,7 +1043,7 @@ ValueLinkRosAcMacroType PARAMS ((m, currMod, head, t, bt, ac),
     Module *currMod _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosAcMacroType *ac)
 {
     Value *v;
@@ -1082,7 +1071,6 @@ ValueLinkRosAcMacroType PARAMS ((m, currMod, head, t, bt, ac),
     FOR_EACH_LIST_ELMT (oid, ac->abstractSyntaxes)
         ValueLinkOid (m, currMod, NULL, NULL,  oid);
 
-    bt = bt; /*AVOIDS Compiler warning.*/
 }  /* ValueLinkRosAcMacroType */
 
 
@@ -1091,9 +1079,9 @@ void
 ValueLinkMtsasExtensionsMacroType PARAMS ((m, currMod, head, t, bt, exts),
     ModuleList *m _AND_
     Module *currMod _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasExtensionsMacroType *exts)
 {
     Value *v;
@@ -1101,8 +1089,6 @@ ValueLinkMtsasExtensionsMacroType PARAMS ((m, currMod, head, t, bt, exts),
     FOR_EACH_LIST_ELMT (v, exts->extensions)
         ValueLinkValue (m, currMod, NULL, t, v);
 
-    bt = bt; /*AVOIDS Compiler warning.*/
-    head = head;
 }  /* ValueLinkMtsasExtensionsMacroType */
 
 
@@ -1112,13 +1098,11 @@ ValueLinkMtsasExtensionMacroType PARAMS ((m, currMod, head, t, bt, ext),
     Module *currMod _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasExtensionMacroType *ext)
 {
     ValueLinkElmtType (m, currMod, head, ext->elmtType);
     ValueLinkValue (m, currMod, NULL, t, ext->defaultValue);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
 }  /* ValueLinkMtsasExtensionMacroType */
 
 
@@ -1127,16 +1111,13 @@ ValueLinkMtsasExtensionAttributeMacroType PARAMS ((m, currMod, head, t,bt, ext),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasExtensionAttributeMacroType *ext)
 {
 
     if (ext != NULL)
         ValueLinkType (m, currMod, head, ext->type);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }  /* ValueLinkMtsasExtensionAttributeMacroType */
 
 
@@ -1145,15 +1126,12 @@ ValueLinkMtsasTokenMacroType PARAMS ((m, currMod, head, t, bt, tok),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasTokenMacroType *tok)
 {
     if (tok != NULL)
         ValueLinkType (m, currMod, head, tok->type);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }  /* ValueLinkMtsasTokenMacroType */
 
 
@@ -1162,15 +1140,12 @@ ValueLinkMtsasTokenDataMacroType PARAMS ((m, currMod, head, t, bt, tok),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasTokenDataMacroType *tok)
 {
     if (tok != NULL)
         ValueLinkType (m, currMod, head, tok->type);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }  /* ValueLinkMtsasTokenDataMacroType */
 
 void
@@ -1178,16 +1153,13 @@ ValueLinkMtsasSecurityCategoryMacroType PARAMS ((m, currMod, head, t, bt, sec),
     ModuleList *m _AND_
     Module *currMod _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasSecurityCategoryMacroType *sec)
 {
 
     if (sec != NULL)
         ValueLinkType (m, currMod, head, sec->type);
-
-    bt =bt; /*AVOIDS Compiler warning.*/
-    t = t;
 }  /* ValueLinkMtsasSecurityCategoryMacroType */
 
 
@@ -1196,18 +1168,15 @@ void
 ValueLinkAsnObjectMacroType PARAMS ((m, currMod, head, t, bt, obj),
     ModuleList *m _AND_
     Module *currMod _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     AsnObjectMacroType *obj)
 {
     AsnPort *ap;
 
     FOR_EACH_LIST_ELMT (ap, obj->ports)
         ValueLinkValue (m, currMod, NULL, t, ap->portValue);
-
-    bt = bt; /*AVOIDS Compiler warning.*/
-    head = head;
 }  /* ValueLinkAsnObjectMacroType */
 
 
@@ -1217,7 +1186,7 @@ ValueLinkAsnPortMacroType PARAMS ((m, currMod, head, t, bt, p),
     Module *currMod _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     AsnPortMacroType *p)
 {
     TypeOrValue *tOrV;
@@ -1247,8 +1216,6 @@ ValueLinkAsnPortMacroType PARAMS ((m, currMod, head, t, bt, p),
         else
             ValueLinkValue (m, currMod, NULL, t, tOrV->a.value);
     }
-
-    bt = bt; /*AVOIDS Compiler warning.*/
 }  /* ValueLinkAsnPortMacroType */
 
 
@@ -1257,9 +1224,9 @@ void
 ValueLinkAsnAbstractBindMacroType PARAMS ((m, currMod, head, t, bt, bind),
     ModuleList *m _AND_
     Module *currMod _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     AsnAbstractBindMacroType *bind)
 {
     AsnPort *ap;
@@ -1267,8 +1234,6 @@ ValueLinkAsnAbstractBindMacroType PARAMS ((m, currMod, head, t, bt, bind),
     FOR_EACH_LIST_ELMT (ap, bind->ports)
         ValueLinkValue (m, currMod, NULL, t, ap->portValue);
 
-    bt = bt; /*AVOIDS Compiler warning.*/
-    head = head;
 }  /* ValueLinkAsnBindMacroType */
 
 
@@ -1279,7 +1244,7 @@ ValueLinkSnmpObjectTypeMacroType PARAMS ((m, currMod, head, t, bt, ot),
     Module *currMod _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     SnmpObjectTypeMacroType *ot)
 {
     TypeOrValue *tOrV;
@@ -1297,5 +1262,4 @@ ValueLinkSnmpObjectTypeMacroType PARAMS ((m, currMod, head, t, bt, ot),
             ValueLinkValue (m, currMod, NULL, t, tOrV->a.value);
     }
 
-    bt = bt; /*AVOIDS Compiler warning.*/
 }  /* ValueLinkSnmpObjectTypeMacroType */
diff --git a/compiler/core/normalize.c b/compiler/core/normalize.c
index 9266a5d..11bc8a5 100644
--- a/compiler/core/normalize.c
+++ b/compiler/core/normalize.c
@@ -251,13 +251,12 @@ void NormalizeObjectAssignmentFields PARAMS ((m, oa, oaf),		// Deepak: 15/Mar/20
 void NormalizeObjectAssignmentFieldBasicType PARAMS ((m, oa, oaf, tOrV),		// Deepak: 15/Mar/2003
 	Module *m _AND_
 	ObjectAssignment *oa _AND_
-	ObjectAssignmentField *oaf _AND_
+	ObjectAssignmentField *oaf ESNACC_UNUSED _AND_
 	TypeOrValue* tOrV)
 {
 	TypeDef *newDef;
 
 		switch(tOrV->a.type->basicType->choiceId)
-		//if(oaf->typeOrValue->a.type != type)
 		{
 		case BASICTYPE_SEQUENCE: 
 			newDef = AddConsObjectAssignment (m, oa, tOrV->a.type, tOrV->a.type->basicType, SEQ_SUFFIX);
@@ -298,7 +297,6 @@ void NormalizeObjectAssignmentFieldBasicType PARAMS ((m, oa, oaf, tOrV),		// Dee
 		default:
 		  break;
 		}
-	oaf = oaf;	// avoids warning
 }	/* NormalizeObjectAssignmentFieldBasicType */
 
 
@@ -336,7 +334,7 @@ NormalizeType PARAMS ((m, td, parent, e, t),
      * Tag removal work is done in parsing (yacc).
      */
 
-    if ((m->tagDefault == IMPLICIT_TAGS))
+    if (m->tagDefault == IMPLICIT_TAGS)
     {
         if ((t->tags != NULL) && (!LIST_EMPTY (t->tags)))
             lastTag = (Tag*)LAST_LIST_ELMT (t->tags);
@@ -1005,7 +1003,7 @@ NormalizeValueDef PARAMS ((m, vd),
 void
 NormalizeValue PARAMS ((m, vd, v, quiet),
     Module *m _AND_
-    ValueDef *vd _AND_
+    ValueDef *vd ESNACC_UNUSED _AND_
     Value *v _AND_
     int quiet)
 {
@@ -1041,7 +1039,6 @@ NormalizeValue PARAMS ((m, vd, v, quiet),
         v->basicValue->choiceId = BASICVALUE_OID;
         v->basicValue->a.oid = eoid;
     }
-    vd = vd;  /* AVOIDS warning. */
 }
 
 
@@ -1122,7 +1119,7 @@ FlattenLinkedOid PARAMS ((o, asn1FileName, lineNo, quiet),
             Free (refdOid); /* since copied into firstElmt */
         }
 
-        else if ((val->basicValue->choiceId == BASICVALUE_INTEGER))
+        else if (val->basicValue->choiceId == BASICVALUE_INTEGER)
         {
             o->arcNum = val->basicValue->a.integer;
             if ((o->arcNum < 0) && !quiet)
diff --git a/compiler/core/print.c b/compiler/core/print.c
index 60d3b22..71a218d 100644
--- a/compiler/core/print.c
+++ b/compiler/core/print.c
@@ -724,14 +724,13 @@ void
 PrintElmtType PARAMS ((f, head, t, nt),
     FILE *f _AND_
     TypeDef *head _AND_
-    Type *t _AND_
+    Type *t ESNACC_UNUSED _AND_
     NamedType *nt)
 {
     if (nt->fieldName != NULL)
         fprintf (f, "%s ", nt->fieldName);
 
     PrintType (f, head, nt->type);
-    t = t;   /* AVOIDS warning. */
 }  /* PrintElmtType */
 
 void
@@ -816,7 +815,7 @@ void
 PrintBasicValue PARAMS ((f, head, valuesType, v, bv),
     FILE *f _AND_
     ValueDef *head _AND_
-    Type *valuesType _AND_
+    Type *valuesType ESNACC_UNUSED _AND_
     Value *v _AND_
     BasicValue *bv)
 {
@@ -926,23 +925,20 @@ PrintBasicValue PARAMS ((f, head, valuesType, v, bv),
         default:
            fprintf (errFileG, "PrintBasicValue: ERROR - unknown value type\n");
     }
-   valuesType = valuesType; /* AVOIDS warning. */
 }  /* PrintBasicValue */
 
 
 void
 PrintElmtValue PARAMS ((f, head, v, nv),
     FILE *f _AND_
-    ValueDef *head _AND_
-    Value *v _AND_
+    ValueDef *head ESNACC_UNUSED _AND_
+    Value *v ESNACC_UNUSED _AND_
     NamedValue *nv)
 {
     if (nv->fieldName != NULL)
         fprintf (f, "%s ", nv->fieldName);
 
     PrintValue (f, NULL, NULL,  nv->value);
-    v = v;
-    head = head;   /* AVOIDS warning. */
 }  /* PrintElmtValue */
 
 
@@ -1313,8 +1309,8 @@ PrintMultipleTypeConstraints PARAMS ((f, head, t, cList),
 void
 PrintNamedElmts PARAMS ((f, head, t, n),
     FILE *f _AND_
-    TypeDef *head _AND_
-    Type *t _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
+    Type *t ESNACC_UNUSED _AND_
     ValueDefList *n)
 {
     ValueDef *vd;
@@ -1333,8 +1329,6 @@ PrintNamedElmts PARAMS ((f, head, t, n),
         if (vd != last)
             fprintf (f,",\n");
     }
-    t = t;
-    head = head;   /* AVOIDS warning. */
 }  /* PrintNamedElmts */
 
 
@@ -1539,9 +1533,9 @@ PrintRosBindMacroType PARAMS ((f, head, t, bt, bind),
 void
 PrintRosAseMacroType PARAMS ((f, head, t, bt, ase),
     FILE *f _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosAseMacroType *ase)
 {
     Value *v;
@@ -1622,8 +1616,6 @@ PrintRosAseMacroType PARAMS ((f, head, t, bt, ase),
         }
     }
     indentG -= indentStepG;
-   bt = bt;
-   head = head; /* AVOIDS warning. */
 }  /* PrintRosAseMacrType */
 
 
@@ -1634,7 +1626,7 @@ PrintRosAcMacroType PARAMS ((f, head, t, bt, ac),
     FILE *f _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     RosAcMacroType *ac)
 {
     Value *v;
@@ -1783,16 +1775,15 @@ PrintRosAcMacroType PARAMS ((f, head, t, bt, ac),
     fprintf (f, "}");
 
     indentG -= indentStepG;
-   bt = bt;  /* AVOIDS warning. */
 }  /* PrintRosAcMacroType */
 
 
 void
 PrintMtsasExtensionsMacroType PARAMS ((f, head, t, bt, exts),
     FILE *f _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasExtensionsMacroType *exts)
 {
     Value *v;
@@ -1817,9 +1808,6 @@ PrintMtsasExtensionsMacroType PARAMS ((f, head, t, bt, exts),
     indentG -= indentStepG;
     INDENT (f, indentG);
     fprintf (f, "}");
-
-    bt = bt;
-    head = head; /* AVOIDS warning. */
 }  /* PrintMtsasExtensionsMacroType */
 
 
@@ -1828,7 +1816,7 @@ PrintMtsasExtensionMacroType PARAMS ((f, head, t, bt, ext),
     FILE *f _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasExtensionMacroType *ext)
 {
 
@@ -1877,8 +1865,6 @@ PrintMtsasExtensionMacroType PARAMS ((f, head, t, bt, ext),
     }
 
     indentG -= indentStepG;
-
-   bt = bt; /* AVOIDS warning. */
 }  /* PrintMtsasExtensionMacroType */
 
 
@@ -1888,8 +1874,8 @@ void
 PrintMtsasExtensionAttributeMacroType PARAMS ((f, head, t, bt, ext),
     FILE *f _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasExtensionAttributeMacroType *ext)
 {
 
@@ -1904,8 +1890,6 @@ PrintMtsasExtensionAttributeMacroType PARAMS ((f, head, t, bt, ext),
         indentG -= indentStepG;
     }
 
-   bt = bt;
-   t = t; /* AVOIDS warning. */
 }  /* PrintMtsasExtensionAttributeMacroType */
 
 
@@ -1914,8 +1898,8 @@ void
 PrintMtsasTokenMacroType PARAMS ((f, head, t, bt, tok),
     FILE *f _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasTokenMacroType *tok)
 {
 
@@ -1928,9 +1912,6 @@ PrintMtsasTokenMacroType PARAMS ((f, head, t, bt, tok),
         PrintType (f, head, tok->type);
         indentG -= indentStepG;
     }
-
-   bt = bt;
-   t = t; /* AVOIDS warning. */
 }  /* PrintMtsasTokenMacro */
 
 
@@ -1938,8 +1919,8 @@ void
 PrintMtsasTokenDataMacroType PARAMS ((f, head, t, bt, tok),
     FILE *f _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasTokenDataMacroType *tok)
 {
 
@@ -1953,9 +1934,6 @@ PrintMtsasTokenDataMacroType PARAMS ((f, head, t, bt, tok),
         PrintType (f, head, tok->type);
         indentG -= indentStepG;
     }
-
-   bt = bt;
-   t = t; /* AVOIDS warning. */
 }  /* PrintMtsasTokenDataMacro */
 
 
@@ -1963,8 +1941,8 @@ void
 PrintMtsasSecurityCategoryMacroType PARAMS ((f, head, t, bt, sec),
     FILE *f _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     MtsasSecurityCategoryMacroType *sec)
 {
 
@@ -1978,9 +1956,6 @@ PrintMtsasSecurityCategoryMacroType PARAMS ((f, head, t, bt, sec),
         PrintType (f, head, sec->type);
         indentG -= indentStepG;
     }
-
-   bt = bt;
-   t = t; /* AVOIDS warning. */
 }  /* PrintMtsasSecurityCategoryMacroType */
 
 
@@ -1988,9 +1963,9 @@ PrintMtsasSecurityCategoryMacroType PARAMS ((f, head, t, bt, sec),
 void
 PrintAsnObjectMacroType PARAMS ((f, head, t, bt, obj),
     FILE *f _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     AsnObjectMacroType *obj)
 {
     AsnPort *ap;
@@ -2030,9 +2005,6 @@ PrintAsnObjectMacroType PARAMS ((f, head, t, bt, obj),
         fprintf (f, "}");
     }
     indentG -= indentStepG;
-
-   bt = bt;
-   head = head; /* AVOIDS warning. */
 }  /* PrintAsnObjectMacroType */
 
 
@@ -2042,7 +2014,7 @@ PrintAsnPortMacroType PARAMS ((f, head, t, bt, p),
     FILE *f _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     AsnPortMacroType *p)
 {
     TypeOrValue *tOrV;
@@ -2136,8 +2108,6 @@ PrintAsnPortMacroType PARAMS ((f, head, t, bt, p),
     }
 
     indentG -= indentStepG;
-
-   bt = bt; /* AVOIDS warning. */
 }  /* PrintAsnPortMacroType */
 
 
@@ -2212,16 +2182,14 @@ void
 PrintAfAlgorithmMacroType PARAMS ((f, head, t, bt, alg),
     FILE *f _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     Type *alg)
 {
     indentG += indentStepG;
     fprintf (f, "ALGORITHM PARAMETER ");
     PrintType (f, head, alg);
     indentG -= indentStepG;
-   bt = bt;
-   t = t; /* AVOIDS warning. */
 }  /* PrintAfAlgorithmMacroType */
 
 
@@ -2229,16 +2197,14 @@ void
 PrintAfEncryptedMacroType PARAMS ((f, head, t, bt, encrypt),
     FILE *f _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     Type *encrypt)
 {
     indentG += indentStepG;
     fprintf (f, "ENCRYPTED ");
     PrintType (f, head, encrypt);
     indentG -= indentStepG;
-   bt = bt;
-   t = t; /* AVOIDS warning. */
 }  /* PrintAfEncryptedMacroType */
 
 
@@ -2246,16 +2212,14 @@ void
 PrintAfSignedMacroType PARAMS ((f, head, t, bt, sign),
     FILE *f _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     Type *sign)
 {
     indentG += indentStepG;
     fprintf (f, "SIGNED ");
     PrintType (f, head, sign);
     indentG -= indentStepG;
-   bt  = bt;
-   t = t; /* AVOIDS warning. */
 }  /* PrintAfSignedMacroType */
 
 
@@ -2263,16 +2227,14 @@ void
 PrintAfSignatureMacroType PARAMS ((f, head, t, bt, sig),
     FILE *f _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     Type *sig)
 {
     indentG += indentStepG;
     fprintf (f, "SIGNATURE ");
     PrintType (f, head, sig);
     indentG -= indentStepG;
-   bt = bt;
-   t = t; /* AVOIDS warning. */
 }  /* PrintAfSignatureMacroType */
 
 
@@ -2280,16 +2242,14 @@ void
 PrintAfProtectedMacroType PARAMS ((f, head, t, bt, p),
     FILE *f _AND_
     TypeDef *head _AND_
-    Type *t _AND_
-    BasicType *bt _AND_
+    Type *t ESNACC_UNUSED _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     Type *p)
 {
     indentG += indentStepG;
     fprintf (f, "PROTECTED ");
     PrintType (f, head, p);
     indentG -= indentStepG;
-   bt = bt;
-   t = t; /* AVOIDS warning. */
 }  /* PrintAfMacroType */
 
 
@@ -2298,7 +2258,7 @@ PrintSnmpObjectTypeMacroType PARAMS ((f, head, t, bt, ot),
     FILE *f _AND_
     TypeDef *head _AND_
     Type *t _AND_
-    BasicType *bt _AND_
+    BasicType *bt ESNACC_UNUSED _AND_
     SnmpObjectTypeMacroType *ot)
 {
     TypeOrValue *tOrV;
@@ -2420,7 +2380,6 @@ PrintSnmpObjectTypeMacroType PARAMS ((f, head, t, bt, ot),
     fprintf (f,"\n");
 
     indentG -= indentStepG;
-   bt = bt; /* AVOIDS warning. */
 }  /* PrintSnmpObjectTypeMacroType */
 
 
@@ -2860,7 +2819,7 @@ SpecialPrintType PARAMS ((f, head, t),
 void
 SpecialPrintNamedElmts PARAMS ((f, head, t),
     FILE *f _AND_
-    TypeDef *head _AND_
+    TypeDef *head ESNACC_UNUSED _AND_
     Type *t)
 {
     CNamedElmt *last;
@@ -2886,22 +2845,8 @@ SpecialPrintNamedElmts PARAMS ((f, head, t),
             fprintf (f,", ");
     }
     fprintf (f," } ");
-   head = head; /* AVOIDS warning. */
 }  /* SpecialPrintNamedElmts */
 
-#ifndef WIN32
-static int
-_vscprintf (const char * format, va_list pargs)
-{
-    int retval;
-    va_list argcopy;
-    va_copy(argcopy, pargs);
-    retval = vsnprintf(NULL, 0, format, pargs);
-    va_end(argcopy);
-    return retval;
-}
-#endif
-
 #ifdef WIN32
 static int
 snacc_vsnprintf(char *dest, size_t destsz, const char *format, va_list args)
diff --git a/compiler/core/snacc.c b/compiler/core/snacc.c
index 7ec08ab..60476e0 100644
--- a/compiler/core/snacc.c
+++ b/compiler/core/snacc.c
@@ -1366,10 +1366,10 @@ void
 GenIDLCode PARAMS ((allMods, longJmpVal, genTypes, genValues, genPrinters, genFree),
     ModuleList *allMods _AND_
     long longJmpVal _AND_
-    int genTypes _AND_
+    int genTypes ESNACC_UNUSED _AND_
     int genValues _AND_
-    int genPrinters _AND_
-    int genFree)
+    int genPrinters ESNACC_UNUSED _AND_
+    int genFree ESNACC_UNUSED)
 {
     Module		*currMod;
     char		*modBaseFileName;
@@ -1436,9 +1436,6 @@ GenIDLCode PARAMS ((allMods, longJmpVal, genTypes, genValues, genPrinters, genFr
             fclose (idlFilePtr);
         }
     }
-    genFree = genFree;
-    genPrinters = genPrinters;
-    genTypes = genTypes;   /* AVOIDS warnings. */
 }  /* GenIDLCode */
 #endif /* IDL */
 
-- 
2.7.4



More information about the dev mailing list