Fixed compilation issues
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Mon, 19 Sep 2011 14:10:57 +0000 (16:10 +0200)
committerDavid van der Spoel <spoel@xray.bmc.uu.se>
Mon, 19 Sep 2011 14:10:57 +0000 (16:10 +0200)
Change-Id: Ic2b724627a994f968fad9bcc1caf6a852d5e5f24

src/tools/binsearch.c
src/tools/gmx_densorder.c
src/tools/gmx_hydorder.c

index d52074b537b86b083d07e662288fae8dd02d1156..3801bffe471727c4440e2c266499ecc3977bf3a7 100644 (file)
@@ -39,6 +39,7 @@
 #endif
 #include <stdio.h>
 #include "types/simple.h"
+#include "gmx_fatal.h"
 
 /*Make range-array (Permutation identity) for sorting */
 void rangeArray(int *ar,int size)
@@ -126,6 +127,7 @@ int BinarySearch (real *array, int low, int high, real key,int direction)
         return min-1;
 
     }/*end -ifelse direction*/
+   return -1;
 }
 
 
index 3fa09036e917881507cd01a237856929938b8e89..d13f539e2501fd1031c96026d9f10b26f34199c0 100644 (file)
@@ -115,7 +115,7 @@ static void density_in_time (const char *fn, atom_id **index ,int gnx[], int grp
         ax1=0,ax2=0, /* tangent directions */
         framenr=0, /* frame number in trajectory*/
         slicex, slicey, slicez; /*slice # of x y z position */
-       real ***Densslice; /* Density-slice in one frame*/
+       real ***Densslice=NULL; /* Density-slice in one frame*/
        real dscale; /*physical scaling factor*/
        real t,x,y,z; /* time and coordinates*/
        rvec bbww;
@@ -682,7 +682,7 @@ int gmx_densorder(int argc,char *argv[])
     int eMeth; 
 
     char **graphfiles, **rawfiles, **spectra; /* Filenames for xpm-surface maps, rawdata and powerspectra */
-    int nfxpm,nfraw, nfspect; /* # files for interface maps and spectra = # interfaces */
+    int nfxpm=-1,nfraw, nfspect; /* # files for interface maps and spectra = # interfaces */
  
     t_pargs pa[] = {
         { "-1d", FALSE, etBOOL, {&b1d},
index 01cee6773174212017a0cc02182db89aa3085aef..b61d93874e4df9f112fb1b428f5f4bb66d4897bc 100644 (file)
@@ -278,10 +278,10 @@ static void calc_tetra_order_interface(const char *fnNDX,const char *fnTPS,const
     rvec       *xtop,*x;
     matrix     box;
     real       sg,sk, sgintf, pos; 
-    atom_id    **index;
-    char       **grpname;
+    atom_id    **index=NULL;
+    char       **grpname=NULL;
     int        i,j,k,n,*isize,ng, nslicez, framenr;
-    real       ***sg_grid,***sk_grid, ***sg_fravg, ***sk_fravg, ****sk_4d, ****sg_4d;
+    real       ***sg_grid=NULL,***sk_grid=NULL, ***sg_fravg=NULL, ***sk_fravg=NULL, ****sk_4d=NULL, ****sg_4d=NULL;
     int             *perm;
     int         ndx1, ndx2;
     int       bins;