Closed Caleblyx closed 1 year ago
Same issue on Debian with GCC 12. I changed code as following and it works.
diff --git a/src/NiuTrans.Decoder/DataCheck.cpp b/src/NiuTrans.Decoder/DataCheck.cpp
index 94b888f..5c39329 100644
--- a/src/NiuTrans.Decoder/DataCheck.cpp
+++ b/src/NiuTrans.Decoder/DataCheck.cpp
@@ -34,7 +34,7 @@
namespace smt{
-bool DataChecker::CheckInputSentences(const char * fn, bool forTuning, int nref)
+void DataChecker::CheckInputSentences(const char * fn, bool forTuning, int nref)
{
char * line = new char[MAX_LINE_LENGTH];
char * msg = new char[1024];
diff --git a/src/NiuTrans.Decoder/DataCheck.h b/src/NiuTrans.Decoder/DataCheck.h
index afed948..fe0bafe 100644
--- a/src/NiuTrans.Decoder/DataCheck.h
+++ b/src/NiuTrans.Decoder/DataCheck.h
@@ -50,7 +50,7 @@ public:
~DataChecker(){};
public:
- static bool CheckInputSentences(const char * fn, bool forTuning, int nref);
+ static void CheckInputSentences(const char * fn, bool forTuning, int nref);
static bool CheckSentence(const char * sent, char * msg);
static bool CheckModelFiles(Configer * configer);
diff --git a/src/NiuTrans.Decoder/TrainingAndDecoding.cpp b/src/NiuTrans.Decoder/TrainingAndDecoding.cpp
index b8a8ec1..eabcabc 100644
--- a/src/NiuTrans.Decoder/TrainingAndDecoding.cpp
+++ b/src/NiuTrans.Decoder/TrainingAndDecoding.cpp
@@ -388,7 +388,7 @@ void OurSystem::InitForDecodingForServicecMode(int threadNum)
void OurSystem::ReadTestSentences(const char * testfn)
{
- char line[MAX_LINE_LENGTH/4] = "";
+ char line[MAX_LINE_LENGTH] = "";
/* load test sentences */
FILE * file = fopen(testfn, "rb");
Hi, I am using the latest version of NiuTrans.SMT, and while following the Quick Walkthrough of the user manual, I encountered the following issue: I am running this on Centos Stream 8. Please do advise. Thank you!
We have fixed this bug in the latest version. Please check it out. Many thanks to @llccd .
Hi, I am using the latest version of NiuTrans.SMT, and while following the Quick Walkthrough of the user manual, I encountered the following issue: I am running this on Centos Stream 8. Please do advise. Thank you!