summaryrefslogtreecommitdiffhomepage
path: root/ir/lpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2013-07-04 11:23:59 +0200
committerMatthias Braun <matze@braunis.de>2013-07-04 11:26:27 +0200
commit3882b249e7a949fe06dc995af30aa3cce70d88c8 (patch)
tree64756df0de3d0cd98be6db74784f7557347faf25 /ir/lpp
parent3b9811c46b0f2a65afcf38405d75c01dc72e53b8 (diff)
replace assert(0 && "message") with panic("message")
also removed some assert(0) used in verifiers to stop when compiling with assertions (you better use your debugger to stop and keep the code clean)
Diffstat (limited to 'ir/lpp')
-rw-r--r--ir/lpp/lpp.c3
-rw-r--r--ir/lpp/lpp_cplex.c1
-rw-r--r--ir/lpp/mps.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/ir/lpp/lpp.c b/ir/lpp/lpp.c
index 8558797..86b311f 100644
--- a/ir/lpp/lpp.c
+++ b/ir/lpp/lpp.c
@@ -17,6 +17,7 @@
#include "debug.h"
#include "set.h"
#include "debug.h"
+#include "error.h"
#include "sp_matrix.h"
#include "mps.h"
@@ -364,7 +365,7 @@ void lpp_check_startvals(lpp_t *lpp)
}
break;
default:
- assert(0 && "unknown constraint type");
+ panic("unknown constraint type");
}
next: ;
}
diff --git a/ir/lpp/lpp_cplex.c b/ir/lpp/lpp_cplex.c
index 2ade72a..5865101 100644
--- a/ir/lpp/lpp_cplex.c
+++ b/ir/lpp/lpp_cplex.c
@@ -39,7 +39,6 @@ static void chk_cpx_err(cpx_t *cpx)
printf("%s", cpx->buf);
else
printf("Unknown CPLEX error\n");
- assert(0);
}
}
diff --git a/ir/lpp/mps.c b/ir/lpp/mps.c
index 92bbc3a..1d5c822 100644
--- a/ir/lpp/mps.c
+++ b/ir/lpp/mps.c
@@ -10,6 +10,7 @@
#include <stdarg.h>
#include <assert.h>
#include "mps.h"
+#include "error.h"
/**
* These must comply to the enum cst_t in lpp.h
@@ -48,7 +49,7 @@ static void mps_write_line(FILE *out, lpp_mps_style_t style,
case l_data_col2: fmt = " %-8s %-8s %12g %-8s %12g\n"; break; /* Field 2-6 */
case l_data_mst: fmt = " %-8s %12g\n"; break; /* Field 3-4 */
case l_marker: fmt = " M%-7d 'MARKER' '%s'\n"; break; /* Field 2,3,5 */
- default: assert(0);
+ default: panic("invalid line type");
}
} else {
switch (line_type) {
@@ -64,7 +65,7 @@ static void mps_write_line(FILE *out, lpp_mps_style_t style,
case l_data_col2: fmt = " %s\t%s\t%g\t%s\t%g\n"; break;
case l_data_mst: fmt = " %s\t%g\n"; break;
case l_marker: fmt = " M%d\t'MARKER'\t'%s'\n"; break;
- default: assert(0);
+ default: panic("invalid line type");
}
}