Menu

#1 missing 'error' function in GeneticsBase/src/LdMax.cpp

open
nobody
None
5
2006-04-22
2006-04-22
No

There is an 'error' function in the code, which is also in the headers.
However, there is no code for this function. I added the following to
LdMax.cpp to solve the issue (from Goncalo's error code).

===

Index: LdMax.cpp

========================
--- LdMax.cpp (revision 5)
+++ LdMax.cpp (working copy)
@@ -63,6 +63,7 @@
#include "LdMax.h"

+#include "stdarg.h"

LDMax::LDMax()
{
@@ -1004,4 +1005,23 @@
}

}
+
+extern "C" {
+void error ( const char * msg, ... )
+{
+ va_list ap;
+
+ va_start(ap, msg);
+
+ printf("\nFATAL ERROR - \n");
+ vprintf(msg, ap);
+ printf("\n\n");
+
+ va_end(ap);
+
+ exit(EXIT_FAILURE);
+}
+
+
+}

===

Also, the 'numerror' and the 'warning' should be removed from the
header file, as they are unused.

The missing function did not specifically cause me trouble in 'r-
genetics', but I had issues compiling it in another context. It would be
good to have it clean, because it is likely to eventually cause a
problem.

-albert

Discussion