summaryrefslogtreecommitdiffhomepage
path: root/ir/lpp
diff options
context:
space:
mode:
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>2013-03-08 13:04:53 +0100
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2013-03-11 09:28:08 +0100
commitdbaf58e5008527678302096cfc2c95b94ba0ee2c (patch)
tree776516dc4cd2b9b37d2c6c32819b94873506d9eb /ir/lpp
parent4ce5894dadca0ef8d6f49508235d49f3cf5c06af (diff)
Fixed warnings in optimize build.
Diffstat (limited to 'ir/lpp')
-rw-r--r--ir/lpp/lpp.c5
-rw-r--r--ir/lpp/sp_matrix.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ir/lpp/lpp.c b/ir/lpp/lpp.c
index 9370935..a934314 100644
--- a/ir/lpp/lpp.c
+++ b/ir/lpp/lpp.c
@@ -82,8 +82,10 @@ lpp_t *lpp_new_userdef(const char *name, lpp_opt_t opt_type,
lpp->m = new_matrix(estimated_csts, estimated_vars);
lpp->emphasis = lpp_balanced;
idx = lpp_add_cst(lpp, "obj", lpp_objective, 0);
+ (void)idx;
assert(idx == 0);
idx = lpp_add_var(lpp, "rhs", lpp_rhs, 0);
+ (void)idx;
assert(idx == 0);
return lpp;
@@ -187,6 +189,7 @@ int lpp_add_cst(lpp_t *lpp, const char *cst_name, lpp_cst_t cst_type, double rhs
int lpp_add_cst_uniq(lpp_t *lpp, const char *cst_name, lpp_cst_t cst_type, double rhs)
{
+#ifndef NDEBUG
if (cst_name) {
lpp_name_t n;
@@ -195,6 +198,8 @@ int lpp_add_cst_uniq(lpp_t *lpp, const char *cst_name, lpp_cst_t cst_type, doubl
assert(!set_find(lpp_name_t, lpp->cst2nr, &n, sizeof(n), HASH_NAME_T(&n)) &&
"constraint already exists");
}
+#endif
+
return lpp_add_cst(lpp, cst_name, cst_type, rhs);
}
diff --git a/ir/lpp/sp_matrix.c b/ir/lpp/sp_matrix.c
index 59cd2cb..872d8e4 100644
--- a/ir/lpp/sp_matrix.c
+++ b/ir/lpp/sp_matrix.c
@@ -95,6 +95,7 @@ unsigned matrix_get_elem_size(void)
static inline int m_new_size(int old_size, int min)
{
unsigned bits = 0;
+ (void)old_size;
assert(min >= old_size);
while (min > 0) {
min >>= 1;