[med-svn] r10078 - trunk/packages/theseus/trunk/debian/patches

Andreas Tille tille at alioth.debian.org
Sat Mar 24 20:26:21 UTC 2012


Author: tille
Date: 2012-03-24 20:26:21 +0000 (Sat, 24 Mar 2012)
New Revision: 10078

Modified:
   trunk/packages/theseus/trunk/debian/patches/20_hardening.patch
Log:
Does compile with hardening flags but linker problem remains


Modified: trunk/packages/theseus/trunk/debian/patches/20_hardening.patch
===================================================================
--- trunk/packages/theseus/trunk/debian/patches/20_hardening.patch	2012-03-24 17:33:48 UTC (rev 10077)
+++ trunk/packages/theseus/trunk/debian/patches/20_hardening.patch	2012-03-24 20:26:21 UTC (rev 10078)
@@ -1,3 +1,9 @@
+Author: Andreas Tille <tille at debian.org>
+Date:  Sat, 24 Mar 2012 07:48:57 +0100
+Description: Build with hardening flags
+  When compiling with hardening flags variables that are set but not used
+  [-Werror=unused-but-set-variable] all warnings being treated as errors
+
 --- theseus_src.orig/libdistfit/chisqrgen_dist.c
 +++ theseus_src/libdistfit/chisqrgen_dist.c
 @@ -161,7 +161,7 @@
@@ -303,3 +309,116 @@
  
      memcpy(scratchA->w, probs, vlen * sizeof(double));
      memcpy(baseA->w, probs, vlen * sizeof(double));
+--- theseus_src.orig/PCAstats.c
++++ theseus_src/PCAstats.c
+@@ -58,7 +58,7 @@
+ {
+     int            i, j;
+     int            vlen = (int) cdsA->vlen;
+-    int            upper, lower, pcanum;
++    int            /*upper, lower, */ pcanum;
+     double       **CovMat = cdsA->CovMat;
+     double         sum, runsum;
+     PDBCds     *pdbave;
+@@ -101,8 +101,8 @@
+     for (i = 0; i < vlen; ++i)
+        sum += CovMat[i][i];
+ 
+-    lower = vlen - pcanum + 1; /* careful -- inclusive indices */
+-    upper = vlen - 0;
++    /* lower = vlen - pcanum + 1; / * careful -- inclusive indices */
++    /* upper = vlen - 0; */
+     //cdsA->pcamat = MatAlloc(pcanum, vlen);
+     cdsA->pcamat = MatAlloc(vlen, vlen);
+     cdsA->pcavals = malloc(vlen * sizeof(double));
+@@ -237,7 +237,7 @@
+     int                      i, j;
+     int                      vlen = (int) 3 * cdsA->vlen;
+     double                 **mat = NULL;
+-    int                      upper, lower, pcanum;
++    int                      /* upper, lower, */ pcanum;
+     double                 **evecs = NULL, *evals = NULL;
+     double                   sum, runsum;
+     PDBCds               *pdbave = NULL;
+@@ -273,8 +273,8 @@
+     for (i = 0; i < vlen; ++i)
+        sum += mat[i][i];
+ 
+-    lower = vlen - pcanum + 1; /* careful -- inclusive indices */
+-    upper = vlen - 0;
++    /* lower = vlen - pcanum + 1; / * careful -- inclusive indices */
++    /* upper = vlen - 0; */
+     evecs = MatAlloc(vlen, vlen);
+     evals = malloc(vlen * sizeof(double));
+ 
+--- theseus_src.orig/pdbStats.c
++++ theseus_src/pdbStats.c
+@@ -1662,7 +1662,7 @@
+             if (algo->varweight != 0)
+             {
+                 double     *newvar = malloc(vlen * sizeof(double));
+-                double      b, c, xn1;
++                double      b, c/*, xn1*/;
+ 
+                 b = stats->hierarch_p1;
+                 c = stats->hierarch_p2;
+@@ -1670,7 +1670,7 @@
+ 				memcpy(newvar, cdsA->var, vlen * sizeof(double));
+ 				qsort(newvar, vlen, sizeof(double), dblcmp_rev);
+ 				/* qsort-dblcmp_rev sorts big to small */
+-				xn1 = newvar[vlen-4];
++				/* xn1 = newvar[vlen-4]*/;
+ 
+                 logL = invgamma_logL(newvar, vlen-3, b, c);
+                        //- b * ExpInvXn(xn1, b, c) - (1+c)*ExpLogXn(xn1, b, c)
+@@ -1844,13 +1844,13 @@
+         if (algo->hierarch != 0)
+         {
+             double *newvar = malloc(vlen * sizeof(double));
+-            double xn1;
++            /* double xn1; */
+ 
+             memcpy(newvar, var, vlen * sizeof(double));
+             qsort(newvar, vlen, sizeof(double), dblcmp_rev);
+             /* qsort-dblcmp_rev sorts big to small */
+ 
+-            xn1 = newvar[vlen - 4];
++            /*xn1 = newvar[vlen - 4];*/
+ 
+             lndetrow = 0.0;
+             for (i = 0; i < vlen-3; ++i)
+--- theseus_src.orig/QuarticHornFrag.c
++++ theseus_src/QuarticHornFrag.c
+@@ -318,11 +318,11 @@
+     lambdamax = QCProot(coeff, 0.5 * innerprod, precision);
+ 
+     /* Now calculate the optimal rotation from one row of the cofactor matrix */
+-    double a11, a12, a13, a14, a21, a22, a23, a24;
++    double /* a11, a12, */ a13, a14, a21, a22, a23, a24;
+     double a31, a32, a33, a34, a41, a42, a43, a44;
+ 
+-    a11 = SxxpSyy + Szz - lambdamax; 
+-    a12 = SyzmSzy; 
++    /* a11 = SxxpSyy + Szz - lambdamax; */
++    /* a12 = SyzmSzy; */
+     a13 = -SxzmSzx; 
+     a14 = SxymSyx;
+     a21 = SyzmSzy; 
+@@ -652,7 +652,7 @@
+     double         *coeff = NULL;
+     double          var;
+     FILE           *distfile = NULL, *distfile2 = NULL;
+-    double          biggest;
++    /* double          biggest; */
+     double         *array = NULL;
+ 
+ 	double        **Rmat = MatAlloc(3, 3);
+@@ -686,7 +686,7 @@
+ 
+     start_time = clock();
+ 
+-    biggest = 0.0;
++    /* biggest = 0.0; */
+     count = 0;
+     for (coord1 = 0; coord1 < cdsA->cnum; ++coord1)
+     {




More information about the debian-med-commit mailing list