[Dplr-commits] r1063 - in pkg/dplR: . src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 6 11:28:35 CEST 2017


Author: mvkorpel
Date: 2017-04-06 11:28:35 +0200 (Thu, 06 Apr 2017)
New Revision: 1063

Modified:
   pkg/dplR/ChangeLog
   pkg/dplR/DESCRIPTION
   pkg/dplR/src/redfit.c
Log:
Probably suppressed pointer protection alert reported by Tomas Kalibera.
Will try to run the rchk tool on the new version later today.


Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog	2017-02-28 10:17:37 UTC (rev 1062)
+++ pkg/dplR/ChangeLog	2017-04-06 09:28:35 UTC (rev 1063)
@@ -51,6 +51,13 @@
 
 - Technical changes to facilitate the implematation of sfrcs().
 
+File: src/redfit.c
+----------------
+
+- Fixed a pointer protection alert reported by rchk / Tomas
+  Kalibera. Seemed like a false alarm, but the code is slightly
+  cleaner as a result of the change.
+
 * CHANGES IN dplR VERSION 1.6.5
 
 File: combine.rwl.R

Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION	2017-02-28 10:17:37 UTC (rev 1062)
+++ pkg/dplR/DESCRIPTION	2017-04-06 09:28:35 UTC (rev 1063)
@@ -3,7 +3,7 @@
 Type: Package
 Title: Dendrochronology Program Library in R
 Version: 1.6.6
-Date: 2017-02-28
+Date: 2017-04-06
 Authors at R: c(person("Andy", "Bunn", role = c("aut", "cph",
         "cre", "trl"), email = "andy.bunn at wwu.edu"), person("Mikko",
         "Korpela", role = c("aut", "trl")), person("Franco", "Biondi",

Modified: pkg/dplR/src/redfit.c
===================================================================
--- pkg/dplR/src/redfit.c	2017-02-28 10:17:37 UTC (rev 1062)
+++ pkg/dplR/src/redfit.c	2017-04-06 09:28:35 UTC (rev 1063)
@@ -102,10 +102,10 @@
     PROTECT(lmres = eval(lmcall, R_EmptyEnv));
 
     /* dplR: get residuals from the list given by lm.fit(x, y) */
-    lmnames = getAttrib(lmres, R_NamesSymbol);
     PROTECT(tmp = ncall = allocList(2));
     SET_TYPEOF(ncall, LANGSXP);
     SETCAR(tmp, lengthfun); tmp = CDR(tmp);
+    lmnames = getAttrib(lmres, R_NamesSymbol);
     SETCAR(tmp, lmnames);
     PROTECT_WITH_INDEX(sn = eval(ncall, R_BaseEnv), &ipx);
     REPROTECT(sn = coerceVector(sn, REALSXP), ipx);



More information about the Dplr-commits mailing list