Skip to content

Commit

Permalink
fix: compilation errors with --enable-assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
mmklee committed Feb 21, 2012
1 parent 62d1d69 commit f47fd80
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 8 deletions.
2 changes: 2 additions & 0 deletions factory/algext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#endif
#endif

#include "assert.h"

#include "templates/ftmpl_functions.h"
#include "cf_defs.h"
#include "canonicalform.h"
Expand Down
9 changes: 4 additions & 5 deletions factory/cf_gcd_smallp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,6 @@ CFArray
solveGeneralVandermonde (const CFArray& M, const CFArray& A)
{
int r= M.size();
ASSERT (c == r, "number of columns and rows not equal");
ASSERT (A.size() == r, "vector does not have right size");
if (r == 1)
{
Expand Down Expand Up @@ -1965,8 +1964,8 @@ monicSparseInterpol (const CanonicalForm& F, const CanonicalForm& G,
B= M(B);

Variable x= Variable (1);
ASSERT (degree (A, y) == 0, "expected degree (F, 1) == 0");
ASSERT (degree (B, y) == 0, "expected degree (G, 1) == 0");
ASSERT (degree (A, x) == 0, "expected degree (F, 1) == 0");
ASSERT (degree (B, x) == 0, "expected degree (G, 1) == 0");

//univariate case
if (A.isUnivariate() && B.isUnivariate())
Expand Down Expand Up @@ -2223,8 +2222,8 @@ nonMonicSparseInterpol (const CanonicalForm& F, const CanonicalForm& G,
B= M(B);

Variable x= Variable (1);
ASSERT (degree (A, y) == 0, "expected degree (F, 1) == 0");
ASSERT (degree (B, y) == 0, "expected degree (G, 1) == 0");
ASSERT (degree (A, x) == 0, "expected degree (F, 1) == 0");
ASSERT (degree (B, x) == 0, "expected degree (G, 1) == 0");

//univariate case
if (A.isUnivariate() && B.isUnivariate())
Expand Down
3 changes: 3 additions & 0 deletions factory/cf_gcd_smallp.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
//*****************************************************************************

#include <config.h>

#include "assert.h"

#include "cf_factory.h"

CanonicalForm GCD_Fp_extension (const CanonicalForm& F, const CanonicalForm& G,
Variable & alpha, CFList& l, bool& top_level);

Expand Down
1 change: 0 additions & 1 deletion factory/facAlgExt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ AlgExtFactorize (const CanonicalForm& F, const Variable& alpha)
}

factors.insert (CFFactor (Lc(F), 1));
ASSERT (degree (buf) <= 0, "bug in AlgExtFactorize");
if (save_rat) Off(SW_RATIONAL);
return factors;
}
Expand Down
2 changes: 2 additions & 0 deletions factory/facSparseHensel.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#ifndef FAC_SPARSE_HENSEL_H
#define FAC_SPARSE_HENSEL_H

#include "assert.h"

#include "canonicalform.h"
#include "cf_map_ext.h"
#include "cf_iter.h"
Expand Down
2 changes: 1 addition & 1 deletion factory/gfops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static void gf_get_table ( int p, int n )

void gf_setcharacteristic ( int p, int n, char name )
{
ASSERT( gf_valid_combination( p, n ), "illegal immediate GF(q)" );
//ASSERT( gf_valid_combination( p, n ), "illegal immediate GF(q)" );
gf_name = name;
gf_get_table( p, n );
}
Expand Down
2 changes: 2 additions & 0 deletions factory/templates/ftmpl_array.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* emacs edit mode for this file is -*- C++ -*- */
/* $Id$ */

#include <factory/assert.h>

#include <factory/templates/ftmpl_array.h>

template <class T>
Expand Down
2 changes: 2 additions & 0 deletions factory/templates/ftmpl_list.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* emacs edit mode for this file is -*- C++ -*- */
/* $Id$ */

#include <factory/assert.h>

#include <factory/templates/ftmpl_list.h>

template <class T>
Expand Down
2 changes: 2 additions & 0 deletions factory/templates/ftmpl_matrix.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* emacs edit mode for this file is -*- C++ -*- */
/* $Id$ */

#include <factory/assert.h>

#include <factory/templates/ftmpl_matrix.h>

template <class T>
Expand Down
2 changes: 1 addition & 1 deletion factory/variable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static CanonicalForm conv2mipo ( const CanonicalForm & mipo, const Variable alph

Variable rootOf( const CanonicalForm & mipo, char name )
{
ASSERT( legal_mipo( mipo ), "not a legal extension" );
//ASSERT( legal_mipo( mipo ), "not a legal extension" );

int l;
if ( var_names_ext == 0 ) {
Expand Down

0 comments on commit f47fd80

Please sign in to comment.