From 7236d936e381faf32950f1091aa57f240644ac16 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 9 Mar 2012 18:21:58 +0100 Subject: Compile libcrystfel with -Wall, fix warnings --- libcrystfel/Makefile.am | 2 +- libcrystfel/src/hdf5-file.c | 18 ------------------ libcrystfel/src/peaks.c | 8 +------- src/indexamajig.c | 1 - tests/integration_check.c | 2 -- 5 files changed, 2 insertions(+), 29 deletions(-) diff --git a/libcrystfel/Makefile.am b/libcrystfel/Makefile.am index a86b7786..d13bbc93 100644 --- a/libcrystfel/Makefile.am +++ b/libcrystfel/Makefile.am @@ -25,5 +25,5 @@ libcrystfel_la_include_HEADERS = src/beam-parameters.h src/hdf5-file.h \ src/index-priv.h src/reax.h INCLUDES = "-I$(top_srcdir)/data" -AM_CPPFLAGS = -DDATADIR=\""$(datadir)"\" -I$(top_builddir)/lib +AM_CPPFLAGS = -DDATADIR=\""$(datadir)"\" -I$(top_builddir)/lib -Wall AM_CPPFLAGS += -I$(top_srcdir)/lib @LIBCRYSTFEL_CFLAGS@ diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index c212abcb..0310465c 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -317,24 +317,6 @@ static double get_wavelength(struct hdfile *f) } -static double get_i0(struct hdfile *f) -{ - herr_t r; - hid_t dh; - double i0; - - dh = H5Dopen2(f->fh, "/LCLS/f_11_ENRC", H5P_DEFAULT); - if ( dh < 0 ) return -1.0; - - r = H5Dread(dh, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, - H5P_DEFAULT, &i0); - H5Dclose(dh); - if ( r < 0 ) return -1.0; - - return i0; -} - - static void debodge_saturation(struct hdfile *f, struct image *image) { hid_t dh, sh; diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index 974d5b2e..cfe27496 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -186,8 +186,6 @@ int integrate_peak(struct image *image, int cfs, int css, for ( ss=-ir_out; ss<+ir_out; ss++ ) { double val; - double tt = 0.0; - double phi, pa, pb, pol; uint16_t flags; struct panel *p2; int idx; @@ -237,8 +235,6 @@ int integrate_peak(struct image *image, int cfs, int css, for ( ss=-ir_inn; ss<+ir_inn; ss++ ) { double val; - double tt = 0.0; - double phi, pa, pb, pol; uint16_t flags; struct panel *p2; int idx; @@ -309,8 +305,6 @@ static void search_peaks_in_panel(struct image *image, float threshold, double f_ss = 0.0; double intensity = 0.0; double sigma = 0.0; - double pbg = 0.0; - double pmax = 0.0; int nrej_dis = 0; int nrej_pro = 0; int nrej_fra = 0; @@ -564,6 +558,7 @@ static int compare_resolution(const void *av, const void *bv) return a->res > b->res; } + static struct integr_ind *sort_reflections(RefList *list, UnitCell *cell, int *np) { @@ -629,7 +624,6 @@ void integrate_reflections(struct image *image, int use_closer, int bgsub, double fs, ss, intensity; double d; int idx; - double bg, max; double sigma, snr; double pfs, pss; int r; diff --git a/src/indexamajig.c b/src/indexamajig.c index faee01fc..859b475e 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -796,7 +796,6 @@ int main(int argc, char *argv[]) return 1; } - if ( filename == NULL ) { filename = strdup("-"); } diff --git a/tests/integration_check.c b/tests/integration_check.c index eeccc6ec..3a7dd0b6 100644 --- a/tests/integration_check.c +++ b/tests/integration_check.c @@ -101,8 +101,6 @@ static void fourth_integration_check(struct image *image, int n_trials, int *fail) { double mean_intensity = 0.0; - double mean_bg = 0.0; - double mean_max = 0.0; double mean_sigma = 0.0; int i; int fs, ss; -- cgit v1.2.3