From 31127edd5ba399192e15e880484f134d6532280e Mon Sep 17 00:00:00 2001 From: ms609 Date: Thu, 15 Mar 2018 07:12:21 +0000 Subject: [PATCH 1/2] Fix warning: redefinition of typedef 'MPLndsets' [-Wpedantic] Warning generated in https://www.r-project.org/nosvn/R.check/r-devel-windows-ix86+x86_64/TreeSearch-00install.html (I've not tested whether this fixes the error, or indeed whether it works...) --- src/morphydefs.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/morphydefs.h b/src/morphydefs.h index def7955..a0a6f81 100644 --- a/src/morphydefs.h +++ b/src/morphydefs.h @@ -46,7 +46,6 @@ typedef unsigned int MPLstate; #define MPLWTMIN (MPL_EPSILON * 10) /*! Safest (for me!) if calculations steer pretty clear of epsilon */ -typedef struct MPLndsets MPLndsets; typedef struct partition_s MPLpartition; // Evaluator function pointers typedef int (*MPLdownfxn) @@ -82,7 +81,6 @@ typedef struct { } MPLcell; -typedef struct charinfo_s MPLcharinfo; typedef struct charinfo_s { int charindex; @@ -112,7 +110,6 @@ typedef struct { } MPLcupdate; -typedef struct partition_s MPLpartition; typedef struct partition_s { MPLchtype chtype; /*!< The optimality type used for this partition. */ From f1f44a7fd782127bae1679abc31ee2fccafd309e Mon Sep 17 00:00:00 2001 From: ms609 Date: Thu, 15 Mar 2018 07:28:32 +0000 Subject: [PATCH 2/2] Define MPLndsets before first use --- src/morphydefs.h | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/morphydefs.h b/src/morphydefs.h index a0a6f81..ca5d364 100644 --- a/src/morphydefs.h +++ b/src/morphydefs.h @@ -46,6 +46,30 @@ typedef unsigned int MPLstate; #define MPLWTMIN (MPL_EPSILON * 10) /*! Safest (for me!) if calculations steer pretty clear of epsilon */ + +typedef struct MPLndsets { + + bool updated; + int steps_to_recall; + MPLstate* downpass1; + MPLstate* uppass1; + MPLstate* downpass2; + MPLstate* uppass2; + MPLstate* subtree_actives; + MPLstate* temp_subtr_actives; + MPLstate* temp_downpass1; + MPLstate* temp_uppass1; + MPLstate* temp_downpass2; + MPLstate* temp_uppass2; + bool* changes; + char** downp1str; + char** downp2str; + char** upp1str; + char** upp2str; + +} MPLndsets; + + typedef struct partition_s MPLpartition; // Evaluator function pointers typedef int (*MPLdownfxn) @@ -147,30 +171,6 @@ typedef struct partition_s { } MPLpartition; - -typedef struct MPLndsets { - - bool updated; - int steps_to_recall; - MPLstate* downpass1; - MPLstate* uppass1; - MPLstate* downpass2; - MPLstate* uppass2; - MPLstate* subtree_actives; - MPLstate* temp_subtr_actives; - MPLstate* temp_downpass1; - MPLstate* temp_uppass1; - MPLstate* temp_downpass2; - MPLstate* temp_uppass2; - bool* changes; - char** downp1str; - char** downp2str; - char** upp1str; - char** upp2str; - -} MPLndsets; - - typedef struct mpl_matrix_s { int ncells; MPLcell* cells;