aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2012-08-08 11:59:46 +0200
committerThomas White <taw@bitwiz.org.uk>2012-08-08 11:59:46 +0200
commite295e00053fff65f53e45ebb6b149d65225d04a8 (patch)
tree47e6bd3264bff5d592e281b7019c5b284a3a64bf /libcrystfel/src
parent7903f6c31f7a13c26d97bdf1f7791c5b5804ea84 (diff)
Fix buglets spotted by new compiler on Fedora 17
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/cell.c3
-rw-r--r--libcrystfel/src/detector.c3
-rw-r--r--libcrystfel/src/reax.c15
-rw-r--r--libcrystfel/src/stream.c2
-rw-r--r--libcrystfel/src/symmetry.c6
5 files changed, 7 insertions, 22 deletions
diff --git a/libcrystfel/src/cell.c b/libcrystfel/src/cell.c
index b6ea010b..84361414 100644
--- a/libcrystfel/src/cell.c
+++ b/libcrystfel/src/cell.c
@@ -895,7 +895,7 @@ UnitCell *match_cell_ab(UnitCell *cell, UnitCell *template)
int used[3];
struct rvec real_a, real_b, real_c;
struct rvec params[3];
- double alen, blen, clen;
+ double alen, blen;
float ltl = 5.0; /* percent */
int have_real_a;
int have_real_b;
@@ -911,7 +911,6 @@ UnitCell *match_cell_ab(UnitCell *cell, UnitCell *template)
}
alen = modulus(ax, ay, az);
blen = modulus(bx, by, bz);
- clen = modulus(cx, cy, cz);
/* Get the lengths from the cell and turn them into anonymous vectors */
if ( cell_get_cartesian(cell, &ax, &ay, &az,
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c
index f212821d..5f138eac 100644
--- a/libcrystfel/src/detector.c
+++ b/libcrystfel/src/detector.c
@@ -750,7 +750,6 @@ struct detector *get_detector_geometry(const char *filename)
char line[1024];
struct badregion *badregion = NULL;
struct panel *panel = NULL;
- char *key;
char wholeval[1024];
rval = fgets(line, 1023, fh);
@@ -802,8 +801,6 @@ struct detector *get_detector_geometry(const char *filename)
}
}
- key = path[1];
-
if ( panel != NULL ) {
if ( parse_field_for_panel(panel, path[1],
wholeval, det) )
diff --git a/libcrystfel/src/reax.c b/libcrystfel/src/reax.c
index 259ec199..5cfa908a 100644
--- a/libcrystfel/src/reax.c
+++ b/libcrystfel/src/reax.c
@@ -467,7 +467,6 @@ static void find_candidates(struct reax_private *p,
const char *rg, struct detector *det)
{
int i;
- double th, ph;
for ( i=0; i<s->n_search; i++ ) {
s->search[i].cand = calloc(MAX_CANDIDATES,
@@ -475,7 +474,6 @@ static void find_candidates(struct reax_private *p,
s->search[i].n_cand = 0;
}
- th = 0.0; ph = 0.0;
for ( i=0; i<p->n_dir; i++ ) {
check_dir(&p->directions[i], flist,
p->nel, pmax, fft_in, fft_out, p->plan,
@@ -492,7 +490,10 @@ static void find_candidates(struct reax_private *p,
int j;
sv = &s->search[i];
- refine_vector(flist, &sv->cand[j].v);
+
+ for ( j=0; j<sv->n_cand; j++ ) {
+ refine_vector(flist, &sv->cand[j].v);
+ }
}
@@ -593,7 +594,6 @@ static void refine_rigid_group(struct image *image, UnitCell *cell,
double bx, by, bz, mb;
double cx, cy, cz, mc;
double pha, phb, phc;
- struct panel *p;
int i, j;
fftw_complex *r_fft_in;
fftw_complex *r_fft_out;
@@ -618,13 +618,6 @@ static void refine_rigid_group(struct image *image, UnitCell *cell,
pr->nel, pmax, fft_in, fft_out, plan,
smin, smax, rg, det);
- for ( i=0; i<det->n_panels; i++ ) {
- if ( det->panels[i].rigid_group == rg ) {
- p = &det->panels[i];
- break;
- }
- }
-
r_fft_in = fftw_malloc(pr->cw*pr->ch*sizeof(fftw_complex));
r_fft_out = fftw_malloc(pr->cw*pr->ch*sizeof(fftw_complex));
for ( i=0; i<pr->cw; i++ ) {
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index ce0ee33e..6627e7ea 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -335,7 +335,6 @@ int read_chunk(FILE *fh, struct image *image)
int have_bs = 0;
int have_cs = 0;
int have_filename = 0;
- int have_cell = 0;
int have_ev = 0;
if ( find_start_of_chunk(fh) ) return 1;
@@ -410,7 +409,6 @@ int read_chunk(FILE *fh, struct image *image)
image->indexed_cell = cell_new_from_reciprocal_axes(as,
bs,
cs);
- have_cell = 1;
have_as = 0; have_bs = 0; have_cs = 0;
}
diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c
index ab837ec0..0352e441 100644
--- a/libcrystfel/src/symmetry.c
+++ b/libcrystfel/src/symmetry.c
@@ -1275,8 +1275,7 @@ SymOpList *get_ambiguities(const SymOpList *source, const SymOpList *target)
SymOpList *src_reordered;
SymOpMask *used;
char *name;
- int index;
-
+
n_src = num_ops(source);
n_tgt = num_ops(target);
@@ -1290,8 +1289,7 @@ SymOpList *get_ambiguities(const SymOpList *source, const SymOpList *target)
ERROR("Subgroup index would be fractional.\n");
return NULL;
}
- index = n_src / n_tgt;
-
+
src_reordered = new_symoplist();
used = new_symopmask(source);