Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorredpony <redpony@1f5c12ca-751b-0410-a591-d2e778427230>2006-09-12 23:46:16 +0400
committerredpony <redpony@1f5c12ca-751b-0410-a591-d2e778427230>2006-09-12 23:46:16 +0400
commit7d50d155dc8140c3c7422edac8892bbd59c4c634 (patch)
treebe55ee5b0fe1cfc9e603243cea064c71fdce51f4 /scripts
parentc69cfaf33ed926c720933749950e38f1c00bdf01 (diff)
fix compilation error on gcc 4.1, fix warnings in mert
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@813 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/training/cmert-0.5/mert.c7
-rw-r--r--scripts/training/symal/symal.cpp1
2 files changed, 5 insertions, 3 deletions
diff --git a/scripts/training/cmert-0.5/mert.c b/scripts/training/cmert-0.5/mert.c
index 3ef762f6d..fea42b297 100755
--- a/scripts/training/cmert-0.5/mert.c
+++ b/scripts/training/cmert-0.5/mert.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <unistd.h>
+#include <math.h>
#include "data.h"
#include "point.h"
@@ -215,7 +216,7 @@ point_t *line_optimize(data_t *data, point_t *origin, point_t *dir) {
if (intersection_n == 0)
best_x = 0.0;
else {
- qsort(intersections, intersection_n, sizeof(intersection_t *), compare_intersections);
+ qsort(intersections, intersection_n, sizeof(intersection_t *), (int(*)(const void *, const void *))compare_intersections);
best_x = intersections[0]->x - 1000.0; // whatever
}
for (intersection_i = 0; intersection_i < intersection_n; intersection_i++) {
@@ -304,8 +305,8 @@ point_t *optimize_powell(data_t *data, point_t *point) {
if (extrapolatedwin > 0 &&
2*(2*totalwin - extrapolatedwin) *
- powf(totalwin - biggestwin, 2.0) <
- powf(extrapolatedwin, 2.0)*biggestwin) {
+ powf(totalwin - biggestwin, 2.0f) <
+ powf(extrapolatedwin, 2.0f)*biggestwin) {
// replace dominant direction vector with sum vector
point_delete(u[biggestwin_i]);
point_normalize(point);
diff --git a/scripts/training/symal/symal.cpp b/scripts/training/symal/symal.cpp
index 1a6d762a2..0a2cec43b 100644
--- a/scripts/training/symal/symal.cpp
+++ b/scripts/training/symal/symal.cpp
@@ -1,5 +1,6 @@
using namespace std;
+#include <cassert>
#include <iomanip>
#include <iostream>
#include <fstream>