summaryrefslogtreecommitdiffhomepage
path: root/ir/lpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2012-12-17 15:57:38 +0100
committerMatthias Braun <matze@braunis.de>2012-12-17 17:42:47 +0100
commit493edb72be97161f5c8762e4589631a6e7083a29 (patch)
treed5298e9bac1c2743bf784db037826f5ca4f9db40 /ir/lpp
parent39d27142301974fb4de82cf484aee9e241226d93 (diff)
fix a few -pedantic warnings
Diffstat (limited to 'ir/lpp')
-rw-r--r--ir/lpp/lpp_cplex.c12
-rw-r--r--ir/lpp/lpp_cplex.h2
-rw-r--r--ir/lpp/lpp_gurobi.c12
-rw-r--r--ir/lpp/lpp_gurobi.h2
4 files changed, 21 insertions, 7 deletions
diff --git a/ir/lpp/lpp_cplex.c b/ir/lpp/lpp_cplex.c
index 88187f1..636645e 100644
--- a/ir/lpp/lpp_cplex.c
+++ b/ir/lpp/lpp_cplex.c
@@ -9,8 +9,10 @@
*/
#include "config.h"
-#ifdef WITH_CPLEX
#include "lpp_cplex.h"
+#include "error.h"
+
+#ifdef WITH_CPLEX
#include <stdio.h>
#include <stdlib.h>
@@ -262,4 +264,12 @@ void lpp_solve_cplex(lpp_t *lpp)
free_cpx(cpx);
}
+#else
+
+void lpp_solve_cplex(lpp_t *lpp)
+{
+ (void)lpp;
+ panic("libfirm compiled without cplex support");
+}
+
#endif
diff --git a/ir/lpp/lpp_cplex.h b/ir/lpp/lpp_cplex.h
index 40b7412..7577373 100644
--- a/ir/lpp/lpp_cplex.h
+++ b/ir/lpp/lpp_cplex.h
@@ -12,8 +12,6 @@
#include "lpp.h"
-#ifdef WITH_CPLEX
void lpp_solve_cplex(lpp_t *lpp);
-#endif
#endif
diff --git a/ir/lpp/lpp_gurobi.c b/ir/lpp/lpp_gurobi.c
index b363778..5f882dd 100644
--- a/ir/lpp/lpp_gurobi.c
+++ b/ir/lpp/lpp_gurobi.c
@@ -9,8 +9,10 @@
*/
#include "config.h"
-#ifdef WITH_GUROBI
#include "lpp_gurobi.h"
+#include "error.h"
+
+#ifdef WITH_GUROBI
#include <stdio.h>
#include <stdlib.h>
@@ -20,7 +22,6 @@
#include <gurobi_c.h>
-#include "error.h"
#include "sp_matrix.h"
static char gurobi_cst_encoding[4] = { 0, GRB_EQUAL, GRB_LESS_EQUAL, GRB_GREATER_EQUAL };
@@ -225,4 +226,11 @@ void lpp_solve_gurobi(lpp_t *lpp)
free_gurobi(grb);
}
+#else
+
+void lpp_solve_gurobi(lpp_t *lpp)
+{
+ (void)lpp;
+}
+
#endif
diff --git a/ir/lpp/lpp_gurobi.h b/ir/lpp/lpp_gurobi.h
index 1e79ffd..e7bc9f4 100644
--- a/ir/lpp/lpp_gurobi.h
+++ b/ir/lpp/lpp_gurobi.h
@@ -12,8 +12,6 @@
#include "lpp.h"
-#ifdef WITH_GUROBI
void lpp_solve_gurobi(lpp_t *lpp);
-#endif
#endif