Index: Singular/iparith.cc
===================================================================
--- Singular/iparith.cc	(revision 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f)
+++ Singular/iparith.cc	(revision 2d2e405d7138f02ad0e65aa5dea02a546bf27c00)
@@ -208,10 +208,5 @@
 static BOOLEAN jjLOAD(leftv res, leftv v, BOOLEAN autoexport = FALSE);
 static int iiTabIndex(const jjValCmdTab dArithTab, const int len, const int op);
-#ifdef MDEBUG
-#define jjMakeSub(A) jjDBMakeSub(A,__FILE__,__LINE__)
-static Subexpr jjDBMakeSub(leftv e,const char *f,const  int l);
-#else
 static Subexpr jjMakeSub(leftv e);
-#endif
 
 /*============= vars ======================*/
@@ -534,5 +529,4 @@
   }
   poly u_p=(poly)u->CopyD(POLY_CMD);
-  int dummy;
   if ((u_p!=NULL)
   && ((v_i!=0) && 
@@ -822,5 +816,4 @@
   poly a;
   poly b;
-  int dummy;
   if (v->next==NULL)
   {
@@ -1625,5 +1618,4 @@
     else                    p=(intvec*)v->Data();
     int rl=c->nr+1;
-    poly r=NULL,h;
     ideal result;
     ideal *x=(ideal *)omAlloc(rl*sizeof(ideal));
@@ -1887,10 +1879,10 @@
   return FALSE;
 }
-static BOOLEAN jjEXPORTTO(leftv res, leftv u, leftv v)
+static BOOLEAN jjEXPORTTO(leftv, leftv u, leftv v)
 {
   //Print("exportto %s -> %s\n",v->Name(),u->Name() );
   return iiExport(v,0,(idhdl)u->data);
 }
-static BOOLEAN jjERROR(leftv res, leftv u)
+static BOOLEAN jjERROR(leftv, leftv u)
 {
   WerrorS((char *)u->Data());
@@ -2418,5 +2410,5 @@
   return FALSE;
 }
-static BOOLEAN jjLOAD2(leftv res, leftv u,leftv v)
+static BOOLEAN jjLOAD2(leftv res, leftv, leftv v)
 {
   return jjLOAD(res, v,TRUE);
@@ -2506,5 +2498,5 @@
   return jjMONITOR2(res,v,NULL);
 }
-static BOOLEAN jjMONITOR2(leftv res, leftv u,leftv v)
+static BOOLEAN jjMONITOR2(leftv, leftv u,leftv v)
 {
 #if 0
@@ -2571,5 +2563,5 @@
   return err;
 }
-static BOOLEAN jjNEWSTRUCT2(leftv res, leftv u, leftv v)
+static BOOLEAN jjNEWSTRUCT2(leftv, leftv u, leftv v)
 {
   // u: the name of the new type
@@ -2953,6 +2945,4 @@
     return TRUE;
   }
-  int l=0;
-  //resolvente r;
   syStrategy r;
   intvec *weights=NULL;
@@ -3391,5 +3381,5 @@
 #define jjWRONG2 (proc2)jjWRONG
 #define jjWRONG3 (proc3)jjWRONG
-static BOOLEAN jjWRONG(leftv res, leftv u)
+static BOOLEAN jjWRONG(leftv, leftv)
 {
   return TRUE;
@@ -3405,5 +3395,5 @@
   return FALSE;
 }
-static BOOLEAN jjNULL(leftv res, leftv u)
+static BOOLEAN jjNULL(leftv, leftv)
 {
   return FALSE;
@@ -3419,5 +3409,5 @@
 //  return FALSE;
 //}
-static BOOLEAN jjPLUSPLUS(leftv res, leftv u)
+static BOOLEAN jjPLUSPLUS(leftv, leftv u)
 {
   if (IDTYP((idhdl)u->data)==INT_CMD)
@@ -3745,5 +3735,5 @@
   return FALSE;
 }
-static BOOLEAN jjDUMP(leftv res, leftv v)
+static BOOLEAN jjDUMP(leftv, leftv v)
 {
   si_link l = (si_link)v->Data();
@@ -3771,5 +3761,5 @@
   return (co<=0);
 }
-static BOOLEAN jjEXECUTE(leftv res, leftv v)
+static BOOLEAN jjEXECUTE(leftv, leftv v)
 {
   char * d = (char *)v->Data();
@@ -3841,5 +3831,5 @@
 }
 #endif
-static BOOLEAN jjGETDUMP(leftv res, leftv v)
+static BOOLEAN jjGETDUMP(leftv, leftv v)
 {
   si_link l = (si_link)v->Data();
@@ -3909,5 +3899,5 @@
   return FALSE;
 }
-static BOOLEAN jjHILBERT(leftv res, leftv v)
+static BOOLEAN jjHILBERT(leftv, leftv v)
 {
 #ifdef HAVE_RINGS
@@ -4076,5 +4066,5 @@
   return FALSE;
 }
-static BOOLEAN jjIS_RINGVAR0(leftv res, leftv v)
+static BOOLEAN jjIS_RINGVAR0(leftv res, leftv)
 {
   res->data = (char *)0;
@@ -4253,6 +4243,4 @@
      A list [P, L, U] is returned. */
   matrix mat = (const matrix)v->Data();
-  int rr = mat->rows();
-  int cc = mat->cols();
   matrix pMat;
   matrix lMat;
@@ -4273,5 +4261,4 @@
 {
   omUpdateInfo();
-  long d;
   switch(((int)(long)v->Data()))
   {
@@ -4364,5 +4351,5 @@
   return FALSE;
 }
-static BOOLEAN jjOpenClose(leftv res, leftv v)
+static BOOLEAN jjOpenClose(leftv, leftv v)
 {
   si_link l=(si_link)v->Data();
@@ -4392,5 +4379,5 @@
   return FALSE;
 }
-static BOOLEAN jjPARDEG(leftv res, leftv v)
+static BOOLEAN jjPARDEG(leftv res, leftv)
 {
   if (rField_is_Extension(currRing))
@@ -4510,5 +4497,4 @@
   char *s= (char *)v->Data();
   int i = 1;
-  int l = strlen(s);
   for(i=0; i<sArithBase.nCmdUsed; i++)
   {
@@ -4646,5 +4632,4 @@
 static BOOLEAN jjSQR_FREE(leftv res, leftv u)
 {
-  intvec *v=NULL;
   singclap_factorize_retry=0;
   ideal f=singclap_sqrfree((poly)(u->CopyD()),currRing);
@@ -4879,5 +4864,5 @@
   return FALSE;
 }
-static BOOLEAN jjLOAD(leftv res, leftv v, BOOLEAN autoexport)
+static BOOLEAN jjLOAD(leftv, leftv v, BOOLEAN autoexport)
 {
   char * s=(char *)v->CopyD();
@@ -5842,5 +5827,5 @@
   return FALSE;
 }
-static BOOLEAN jjNEWSTRUCT3(leftv res, leftv u, leftv v, leftv w)
+static BOOLEAN jjNEWSTRUCT3(leftv, leftv u, leftv v, leftv w)
 {
   // u: the name of the new type
@@ -5850,5 +5835,5 @@
                                             (const char *)w->Data());
   if (d!=NULL) newstruct_setup((const char *)u->Data(),d);
-  return d==NULL;
+  return (d==NULL);
 }
 static BOOLEAN jjPREIMAGE(leftv res, leftv u, leftv v, leftv w)
@@ -6268,5 +6253,5 @@
 /* must be ordered: first operations for chars (infix ops),
  * then alphabetically */
-static BOOLEAN jjBREAK0(leftv res, leftv v)
+static BOOLEAN jjBREAK0(leftv, leftv)
 {
 #ifdef HAVE_SDB
@@ -6275,5 +6260,5 @@
   return FALSE;
 }
-static BOOLEAN jjBREAK1(leftv res, leftv v)
+static BOOLEAN jjBREAK1(leftv, leftv v)
 {
 #ifdef HAVE_SDB
@@ -6316,5 +6301,5 @@
 }
 
-static BOOLEAN jjCOEF_M(leftv res, leftv v)
+static BOOLEAN jjCOEF_M(leftv, leftv v)
 {
   if((v->Typ() != VECTOR_CMD)
@@ -6888,5 +6873,5 @@
   return FALSE;
 }
-static BOOLEAN jjNAMES0(leftv res, leftv v)
+static BOOLEAN jjNAMES0(leftv res, leftv)
 {
   res->data=(void *)ipNameList(IDROOT);
@@ -7013,5 +6998,5 @@
   }
 }
-static BOOLEAN jjRESERVED0(leftv res, leftv v)
+static BOOLEAN jjRESERVED0(leftv, leftv)
 {
   int i=1;
@@ -7068,5 +7053,5 @@
   return FALSE;
 }
-static BOOLEAN jjTEST(leftv res, leftv v)
+static BOOLEAN jjTEST(leftv, leftv v)
 {
   do
@@ -7382,9 +7367,5 @@
 
 
-#ifdef MDEBUG
-static Subexpr jjDBMakeSub(leftv e,const char *f,const int l)
-#else
 static Subexpr jjMakeSub(leftv e)
-#endif
 {
   assume( e->Typ()==INT_CMD );
@@ -8235,5 +8216,4 @@
 int iiInitArithmetic()
 {
-  int i;
   //printf("iiInitArithmetic()\n");
   memset(&sArithBase, 0, sizeof(sArithBase));
@@ -8269,48 +8249,4 @@
 }
 
-/*---------------------------------------------------------------------*/
-/**
- * @brief append newitem of size sizeofitem to the list named list.
-
- @param[in,out] list
- @param[in,out] item_count
- @param[in] sizeofitem
- @param[in] newitem
-
- @retval  0 success
- @retval -1 failure
-**/
-/*---------------------------------------------------------------------*/
-int iiArithAddItem2list(
-  void **list,
-  long  *item_count,
-  long sizeofitem,
-  void *newitem
-  )
-{
-  int count = *item_count;
-
-  //TRACE(0, "add_item_to_list(%p, %p, %ld, %p)\n", list, item_count,
-  //       sizeofitem, newitem);
-
-  if(count==0)
-  {
-    *list = (void *)omAlloc(sizeofitem);
-  }
-  else
-  {
-    *list = (void *)omRealloc(*list, (count+1) * sizeofitem);
-  }
-  if((*list)==NULL) return -1;
-
-  //memset((*list)+count*sizeofitem, 0, sizeofitem);
-  //memcpy((*list)+count*sizeofitem, newitem, sizeofitem);
-
-  /* erhoehe counter um 1 */
-  (count)++;
-  *item_count = count;
-  return 0;
-}
-
 int iiArithFindCmd(const char *szName)
 {
Index: libpolys/coeffs/ffields.cc
===================================================================
--- libpolys/coeffs/ffields.cc	(revision 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f)
+++ libpolys/coeffs/ffields.cc	(revision 2d2e405d7138f02ad0e65aa5dea02a546bf27c00)
@@ -205,5 +205,5 @@
 * number -> int
 */
-int nfInt (number &n, const coeffs r)
+int nfInt (number &, const coeffs )
 {
   return 0;
Index: libpolys/coeffs/longrat.cc
===================================================================
--- libpolys/coeffs/longrat.cc	(revision 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f)
+++ libpolys/coeffs/longrat.cc	(revision 2d2e405d7138f02ad0e65aa5dea02a546bf27c00)
@@ -1268,5 +1268,5 @@
   {
     int in=mpz_fdiv_ui(n->n,(unsigned long)p);
-    long  s, t;
+    long  s;
 
     long  u, v, u0, v0, u1, v1, u2, v2, q, r;
@@ -2458,5 +2458,5 @@
 
 
-static number nlInitMPZ(mpz_t m, const coeffs r)
+static number nlInitMPZ(mpz_t m, const coeffs)
 {
   number z = ALLOC_RNUMBER();
Index: libpolys/polys/ext_fields/algext.cc
===================================================================
--- libpolys/polys/ext_fields/algext.cc	(revision 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f)
+++ libpolys/polys/ext_fields/algext.cc	(revision 2d2e405d7138f02ad0e65aa5dea02a546bf27c00)
@@ -571,5 +571,5 @@
   return (number)p;
 }
-CanonicalForm naConvSingNFactoryN( number n, BOOLEAN setChar, const coeffs cf )
+CanonicalForm naConvSingNFactoryN( number n, BOOLEAN /*setChar*/, const coeffs cf )
 {
   naTest(n);
@@ -639,5 +639,5 @@
 #endif
 
-number naCopyExt(number a, const coeffs src, const coeffs dst)
+number naCopyExt(number a, const coeffs src, const coeffs)
 {
   fraction fa=(fraction)a;
Index: libpolys/polys/matpol.cc
===================================================================
--- libpolys/polys/matpol.cc	(revision 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f)
+++ libpolys/polys/matpol.cc	(revision 2d2e405d7138f02ad0e65aa5dea02a546bf27c00)
@@ -728,5 +728,5 @@
 }
 
-static void mp_FinalClean(matrix a, const ring R)
+static void mp_FinalClean(matrix a, const ring)
 {
   omFreeSize((ADDRESS)a->m,a->nrows*a->ncols*sizeof(poly));
@@ -1457,5 +1457,5 @@
 /// entries of a are minors and go to result (only if not in R)
 void mp_MinorToResult(ideal result, int &elems, matrix a, int r, int c,
-                     ideal R, const ring ri)
+                     ideal R, const ring)
 {
   poly *q1;
Index: libpolys/polys/monomials/p_polys.cc
===================================================================
--- libpolys/polys/monomials/p_polys.cc	(revision 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f)
+++ libpolys/polys/monomials/p_polys.cc	(revision 2d2e405d7138f02ad0e65aa5dea02a546bf27c00)
@@ -3307,5 +3307,5 @@
  * NOTE: this only works for Frank's alg. & trans. fields
  */
-poly n_PermNumber(const number z, const int *par_perm, const int OldPar, const ring src, const ring dst)
+poly n_PermNumber(const number z, const int *par_perm, const int , const ring src, const ring dst)
 {
 #if 0
Index: libpolys/polys/monomials/ring.cc
===================================================================
--- libpolys/polys/monomials/ring.cc	(revision 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f)
+++ libpolys/polys/monomials/ring.cc	(revision 2d2e405d7138f02ad0e65aa5dea02a546bf27c00)
@@ -1604,5 +1604,5 @@
 #ifdef HAVE_PLURAL
   if (rIsPluralRing(r))
-    if( nc_rCopy(res, r, true) );
+    if( nc_rCopy(res, r, true) ) {}
 #endif
 
Index: libpolys/polys/nc/ncSACache.h
===================================================================
--- libpolys/polys/nc/ncSACache.h	(revision 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f)
+++ libpolys/polys/nc/ncSACache.h	(revision 2d2e405d7138f02ad0e65aa5dea02a546bf27c00)
@@ -88,5 +88,5 @@
     };
     
-    virtual void History(const EHistoryType t, const CExponent a, const CExponent b, const poly p = NULL)
+    virtual void History(const EHistoryType , const CExponent a, const CExponent b, const poly p = NULL)
     {
       PrintS("CCacheHash::History(a, b, [p])!\n");
Index: libpolys/polys/simpleideals.cc
===================================================================
--- libpolys/polys/simpleideals.cc	(revision 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f)
+++ libpolys/polys/simpleideals.cc	(revision 2d2e405d7138f02ad0e65aa5dea02a546bf27c00)
@@ -1230,5 +1230,5 @@
       if (cp>mod->rank)
       {
-        Print("## inv. rank %ld -> %d\n",mod->rank,cp);
+        Print("## inv. rank %ld -> %ld\n",mod->rank,cp);
         int k,l,o=mod->rank;
         mod->rank=cp;
Index: libpolys/polys/sparsmat.cc
===================================================================
--- libpolys/polys/sparsmat.cc	(revision 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f)
+++ libpolys/polys/sparsmat.cc	(revision 2d2e405d7138f02ad0e65aa5dea02a546bf27c00)
@@ -528,5 +528,4 @@
 poly sparse_mat::smDet()
 {
-  int y;
   poly res = NULL;
 
@@ -938,5 +937,5 @@
   smpoly res, a, b;
   poly ha, hr, x, y;
-  int e, ip, ir, ia, lev;
+  int e, ip, ir, ia;
 
   if ((c == NULL) || (r == NULL))
@@ -1985,5 +1984,4 @@
 static void sm_ExpMultDiv(poly t, const poly b, const poly c, const ring R)
 {
-  int i;
   p_Test(t,R);
   p_LmTest(b,R);
@@ -2372,5 +2370,4 @@
 {
   sparse_number_mat *linsolv;
-  ring origR;
   ring tmpR;
   ideal rr;
