aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/check_hkl.c4
-rw-r--r--src/compare_hkl.c6
-rw-r--r--src/dw-hdfsee.c12
-rw-r--r--src/get_hkl.c4
-rw-r--r--src/im-sandbox.c3
-rw-r--r--src/powder_plot.c4
-rw-r--r--src/process_hkl.c7
7 files changed, 9 insertions, 31 deletions
diff --git a/src/check_hkl.c b/src/check_hkl.c
index fbc29f00..a1688ad2 100644
--- a/src/check_hkl.c
+++ b/src/check_hkl.c
@@ -68,8 +68,6 @@ static void show_help(const char *s)
static void plot_shells(RefList *list, UnitCell *cell, const SymOpList *sym,
double rmin_fix, double rmax_fix)
{
- double num[NBINS];
- int cts[NBINS];
int possible[NBINS];
unsigned int measurements[NBINS];
unsigned int measured[NBINS];
@@ -104,8 +102,6 @@ static void plot_shells(RefList *list, UnitCell *cell, const SymOpList *sym,
}
for ( i=0; i<NBINS; i++ ) {
- num[i] = 0.0;
- cts[i] = 0;
possible[i] = 0;
measured[i] = 0;
snr_measured[i] = 0;
diff --git a/src/compare_hkl.c b/src/compare_hkl.c
index 2f846087..fb1ac117 100644
--- a/src/compare_hkl.c
+++ b/src/compare_hkl.c
@@ -96,12 +96,9 @@ static void plot_shells(RefList *list1, RefList *list2, double scale,
{
double num[NBINS];
int cts[NBINS];
- unsigned int measurements[NBINS];
- unsigned int measured[NBINS];
double total_vol, vol_per_shell;
double rmins[NBINS];
double rmaxs[NBINS];
- double snr[NBINS];
double rmin, rmax;
int i;
Reflection *refl1;
@@ -119,9 +116,6 @@ static void plot_shells(RefList *list1, RefList *list2, double scale,
num[i] = 0.0;
den[i] = 0.0;
cts[i] = 0;
- measured[i] = 0;
- measurements[i] = 0;
- snr[i] = 0;
}
/* Find resolution limits */
diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c
index de03c62b..54d0bdea 100644
--- a/src/dw-hdfsee.c
+++ b/src/dw-hdfsee.c
@@ -77,13 +77,13 @@ static gint displaywindow_closed(GtkWidget *window, DisplayWindow *dw)
if ( dw->pixbufs != NULL ) {
int i;
for ( i=0; i<dw->n_pixbufs; i++ ) {
- gdk_pixbuf_unref(dw->pixbufs[i]);
+ g_object_unref(dw->pixbufs[i]);
}
free(dw->pixbufs);
}
if ( dw->col_scale != NULL ) {
- gdk_pixbuf_unref(dw->col_scale);
+ g_object_unref(dw->col_scale);
}
if ( dw->image != NULL ) {
@@ -189,12 +189,8 @@ static void show_ring(cairo_t *cr, DisplayWindow *dw,
static void show_simple_ring(cairo_t *cr, DisplayWindow *dw,
double d, cairo_matrix_t *basic_m)
{
- struct detector *det;
-
if ( !dw->use_geom ) return;
- det = dw->image->det;
-
cairo_identity_matrix(cr);
cairo_translate(cr, -dw->min_x/dw->binning,
dw->max_y/dw->binning);
@@ -431,7 +427,7 @@ static void set_window_size(DisplayWindow *dw)
static void update_colscale(DisplayWindow *dw)
{
if ( dw->col_scale != NULL ) {
- gdk_pixbuf_unref(dw->col_scale);
+ g_object_unref(dw->col_scale);
}
dw->col_scale = render_get_colour_scale(20, dw->height, dw->scale);
}
@@ -446,7 +442,7 @@ static void displaywindow_update(DisplayWindow *dw)
if ( dw->pixbufs != NULL ) {
int i;
for ( i=0; i<dw->n_pixbufs; i++ ) {
- gdk_pixbuf_unref(dw->pixbufs[i]);
+ g_object_unref(dw->pixbufs[i]);
}
free(dw->pixbufs);
}
diff --git a/src/get_hkl.c b/src/get_hkl.c
index e298680d..00de38a5 100644
--- a/src/get_hkl.c
+++ b/src/get_hkl.c
@@ -270,10 +270,8 @@ static RefList *expand_reflections(RefList *in, const SymOpList *target,
signed int h, k, l;
int n, j;
- double intensity;
get_indices(refl, &h, &k, &l);
- intensity = get_intensity(refl);
special_position(initial, m, h, k, l);
n = num_equivs(initial, m);
@@ -298,7 +296,7 @@ static RefList *expand_reflections(RefList *in, const SymOpList *target,
/* FIXME: Make phase negative if the reflection is
* separated from the original via an inversion */
- get_phase(refl, &have_phase);
+ ph = get_phase(refl, &have_phase);
if ( have_phase ) set_phase(new, -ph);
}
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index fdbbf3a3..c9ad5300 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -840,7 +840,6 @@ void create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
char results[1024];
char *rval;
int fd;
- int n;
char *eptr;
if ( !sb->running[i] ) {
@@ -863,7 +862,7 @@ void create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
chomp(results);
- n = strtol(results, &eptr, 10);
+ strtol(results, &eptr, 10);
if ( eptr == results ) {
if ( strlen(results) > 0 ) {
ERROR("Invalid result '%s'\n", results);
diff --git a/src/powder_plot.c b/src/powder_plot.c
index 049b9c0e..84f292a3 100644
--- a/src/powder_plot.c
+++ b/src/powder_plot.c
@@ -725,7 +725,7 @@ int main(int argc, char *argv[])
unsigned int n_patterns = 0;
unsigned int n_peaks = 0;
- int c, rval, file_type, data_type;
+ int c, file_type, data_type;
int config_satcorr = 1;
int need_geometry = 0;
int need_beam = 0;
@@ -953,7 +953,7 @@ int main(int argc, char *argv[])
return 1;
}
/* Use wavelength from first chunk */
- rval = read_chunk(fh, &image);
+ read_chunk(fh, &image);
rewind(fh);
} else if (file_type == FILE_H5) {
hdfile = hdfile_open(filename);
diff --git a/src/process_hkl.c b/src/process_hkl.c
index e06270bc..28d54360 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -356,7 +356,6 @@ int main(int argc, char *argv[])
unsigned int n_total_patterns;
char *sym_str = NULL;
SymOpList *sym;
- char *pdb = NULL;
char *histo = NULL;
signed int hist_h, hist_k, hist_l;
signed int hist_nbins=50;
@@ -387,7 +386,7 @@ int main(int argc, char *argv[])
};
/* Short options */
- while ((c = getopt_long(argc, argv, "hi:e:o:p:y:g:f:b:z:",
+ while ((c = getopt_long(argc, argv, "hi:e:o:y:g:f:b:z:",
longopts, NULL)) != -1) {
switch (c) {
@@ -411,10 +410,6 @@ int main(int argc, char *argv[])
config_startafter = atoi(optarg);
break;
- case 'p' :
- pdb = strdup(optarg);
- break;
-
case 'y' :
sym_str = strdup(optarg);
break;