Index: factory/cfEzgcd.cc
===================================================================
--- factory/cfEzgcd.cc	(revision 6c613e319ffabdf574fa1930801650f989bb855a)
+++ factory/cfEzgcd.cc	(revision 8c73aafa5ebc30b384822175472840ec5ab0dde0)
@@ -51,4 +51,5 @@
 TIMING_DEFINE_PRINT(ez_termination)
 
+#ifdef HAVE_NTL // unused otherwise
 static
 int compress4EZGCD (const CanonicalForm& F, const CanonicalForm& G, CFMap & M,
@@ -189,4 +190,5 @@
   return both_non_zero;
 }
+#endif
 
 static inline
@@ -380,4 +382,5 @@
 #endif
 
+#ifdef HAVE_NTL // unused otherwise
 static
 bool findeval (const CanonicalForm & F, const CanonicalForm & G,
@@ -445,4 +448,6 @@
   }
 }
+#endif
+
 static void gcd_mon_rec(CanonicalForm G, CanonicalForm &cf,int *exp,int pl)
 {  // prevoius level: pl
@@ -462,4 +467,5 @@
 }
 
+#ifdef HAVE_NTL // unused otherwise
 static CanonicalForm gcd_mon(CanonicalForm F, CanonicalForm G)
 {
@@ -485,4 +491,5 @@
   return res;
 }
+#endif
 
 #ifdef HAVE_NTL // Hensel
@@ -860,4 +867,5 @@
 
 #if defined(HAVE_NTL) || defined(HAVE_FLINT)
+#ifdef HAVE_NTL // Hensel
 // parameters for heuristic
 STATIC_VAR int maxNumEval= 200;
@@ -866,5 +874,4 @@
 /// Extended Zassenhaus GCD for finite fields.
 /// In case things become too dense we switch to a modular algorithm.
-#ifdef HAVE_NTL // Hensel
 CanonicalForm EZGCD_P( const CanonicalForm & FF, const CanonicalForm & GG )
 {
Index: factory/cfGcdAlgExt.cc
===================================================================
--- factory/cfGcdAlgExt.cc	(revision 6c613e319ffabdf574fa1930801650f989bb855a)
+++ factory/cfGcdAlgExt.cc	(revision 8c73aafa5ebc30b384822175472840ec5ab0dde0)
@@ -657,5 +657,5 @@
 myicontent ( const CanonicalForm & f, const CanonicalForm & c )
 {
-#ifdef HAVE_NTL
+#if defined(HAVE_NTL) || defined(HAVE_FLINT)
     if (f.isOne() || c.isOne())
       return 1;
@@ -707,5 +707,5 @@
 static CanonicalForm myicontent ( const CanonicalForm & f )
 {
-#ifdef HAVE_NTL
+#if defined(HAVE_NTL) || defined(HAVE_FLINT)
     return myicontent( f, 0 );
 #else
Index: factory/cfSubResGcd.cc
===================================================================
--- factory/cfSubResGcd.cc	(revision 6c613e319ffabdf574fa1930801650f989bb855a)
+++ factory/cfSubResGcd.cc	(revision 8c73aafa5ebc30b384822175472840ec5ab0dde0)
@@ -50,6 +50,6 @@
     }
     C = gcd( Ci, Ci1 );
+    #ifdef HAVE_NTL // gcd_test_one, primitiveElement
     int d= 0;
-    #ifdef HAVE_NTL // gcd_test_one, primitiveElement
     if ( !( pi.isUnivariate() && pi1.isUnivariate() ) )
     {
Index: factory/cf_irred.cc
===================================================================
--- factory/cf_irred.cc	(revision 6c613e319ffabdf574fa1930801650f989bb855a)
+++ factory/cf_irred.cc	(revision 8c73aafa5ebc30b384822175472840ec5ab0dde0)
@@ -31,5 +31,5 @@
   nmod_poly_init(Irredpoly,p);
   nmod_poly_randtest_monic_irreducible(Irredpoly, FLINTrandom, i+1);
-  CanonicalForm CFirredpoly=convertnmod_poly_t2FacCF(Irredpoly,Variable(1));
+  CanonicalForm CFirredpoly=convertnmod_poly_t2FacCF(Irredpoly,x);
   nmod_poly_clear(Irredpoly);
   #elif defined(HAVE_NTL)
Index: factory/facAlgExt.cc
===================================================================
--- factory/facAlgExt.cc	(revision 6c613e319ffabdf574fa1930801650f989bb855a)
+++ factory/facAlgExt.cc	(revision 8c73aafa5ebc30b384822175472840ec5ab0dde0)
@@ -59,9 +59,9 @@
   mipo *= bCommonDen (mipo);
 
-  int degg= degree (g);
-  int degmipo= degree (mipo);
   CanonicalForm norm;
   TIMING_START (fac_alg_resultant);
 #ifdef HAVE_NTL
+  int degg= degree (g);
+  int degmipo= degree (mipo);
   if (degg >= 8 || degmipo >= 8)
     norm= resultantZ (g, mipo, x);
Index: factory/facSparseHensel.cc
===================================================================
--- factory/facSparseHensel.cc	(revision 6c613e319ffabdf574fa1930801650f989bb855a)
+++ factory/facSparseHensel.cc	(revision 8c73aafa5ebc30b384822175472840ec5ab0dde0)
@@ -31,5 +31,4 @@
   int si=termsF.size();
   int fl=factors.length();
-  int ch=getCharacteristic();
   //printf("size:%d, length=%d, char=%d\n",si,fl,getCharacteristic());
   if ((si > threshold)
