projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
72c4d03
)
Fix compiler warnings
author
John Darrington
<john@darrington.wattle.id.au>
Wed, 6 Jul 2011 08:47:19 +0000
(10:47 +0200)
committer
John Darrington
<john@darrington.wattle.id.au>
Wed, 6 Jul 2011 08:47:19 +0000
(10:47 +0200)
src/data/ods-reader.c
patch
|
blob
|
history
src/language/stats/oneway.c
patch
|
blob
|
history
src/libpspp/inflate.c
patch
|
blob
|
history
src/libpspp/temp-file.c
patch
|
blob
|
history
src/ui/gui/paired-dialog.c
patch
|
blob
|
history
diff --git
a/src/data/ods-reader.c
b/src/data/ods-reader.c
index 51ee5ac39ace8994901deed27ef1e236ef56591d..9bbfb479e2b9e8d02c1b6642e6ad81193b3a1e3c 100644
(file)
--- a/
src/data/ods-reader.c
+++ b/
src/data/ods-reader.c
@@
-315,13
+315,14
@@
convert_xml_to_value (struct ccase *c, const struct variable *var,
value_copy_str_rpad (v, var_get_width (var), xmv->text, ' ');
else
{
value_copy_str_rpad (v, var_get_width (var), xmv->text, ' ');
else
{
+ const char *text ;
const struct fmt_spec *fmt = var_get_write_format (var);
enum fmt_category fc = fmt_get_category (fmt->type);
assert ( fc != FMT_CAT_STRING);
const struct fmt_spec *fmt = var_get_write_format (var);
enum fmt_category fc = fmt_get_category (fmt->type);
assert ( fc != FMT_CAT_STRING);
- const char *text = xmv->value ? CHAR_CAST (const char *, xmv->value):
- CHAR_CAST (const char *, xmv->text);
+ text =
+
xmv->value ? CHAR_CAST (const char *, xmv->value) :
CHAR_CAST (const char *, xmv->text);
data_in (ss_cstr (text), "UTF-8",
fmt->type,
data_in (ss_cstr (text), "UTF-8",
fmt->type,
@@
-344,12
+345,14
@@
ods_open_reader (struct spreadsheet_read_info *gri, struct dictionary **dict)
int n_var_specs = 0;
struct ods_reader *r = xzalloc (sizeof *r);
int n_var_specs = 0;
struct ods_reader *r = xzalloc (sizeof *r);
+ struct zip_member *content = NULL;
+ struct zip_reader *zreader ;
+ xmlChar *val_string = NULL;
r->read_names = gri->read_names;
ds_init_empty (&r->ods_errs);
r->read_names = gri->read_names;
ds_init_empty (&r->ods_errs);
- struct zip_reader *zreader = zip_reader_create (gri->file_name, &r->ods_errs);
- struct zip_member *content = NULL;
+ zreader = zip_reader_create (gri->file_name, &r->ods_errs);
if ( NULL == zreader)
{
if ( NULL == zreader)
{
@@
-473,7
+476,6
@@
ods_open_reader (struct spreadsheet_read_info *gri, struct dictionary **dict)
}
}
}
}
- xmlChar *val_string = NULL;
/* Read in the first row of data */
while (1 == xmlTextReaderRead (r->xtr))
{
/* Read in the first row of data */
while (1 == xmlTextReaderRead (r->xtr))
{
diff --git
a/src/language/stats/oneway.c
b/src/language/stats/oneway.c
index bdac117c7ce860b88b73fc1af24a7989eb1fa3bd..78bd215088d289b81e63a71a5ba5d511df4c61a9 100644
(file)
--- a/
src/language/stats/oneway.c
+++ b/
src/language/stats/oneway.c
@@
-181,7
+181,7
@@
static double bonferroni_pinv (double std_err, double alpha, double df, int k, c
return std_err * gsl_cdf_tdist_Pinv (1.0 - alpha / (2.0 * m), df);
}
return std_err * gsl_cdf_tdist_Pinv (1.0 - alpha / (2.0 * m), df);
}
-static double sidak_pinv (double std_err, double alpha, double df, int k, const struct moments1 *mom_i
, const struct moments1 *mom_j
)
+static double sidak_pinv (double std_err, double alpha, double df, int k, const struct moments1 *mom_i
UNUSED, const struct moments1 *mom_j UNUSED
)
{
const double m = k * (k - 1) / 2;
double lp = 1.0 - exp (log (1.0 - alpha) / m ) ;
{
const double m = k * (k - 1) / 2;
double lp = 1.0 - exp (log (1.0 - alpha) / m ) ;
@@
-271,21
+271,22
@@
static double scheffe_1tailsig (double ts, double df1, double df2)
}
}
-static double tukey_test_stat (int k, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err)
+static double tukey_test_stat (int k
UNUSED
, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err)
{
{
+ double ts;
double n_i, mean_i, var_i;
double n_j, mean_j, var_j;
moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0);
moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0);
double n_i, mean_i, var_i;
double n_j, mean_j, var_j;
moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0);
moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0);
-
double
ts = (mean_i - mean_j) / std_err;
+ ts = (mean_i - mean_j) / std_err;
ts = fabs (ts) * sqrt (2.0);
return ts;
}
ts = fabs (ts) * sqrt (2.0);
return ts;
}
-static double lsd_test_stat (int k, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err)
+static double lsd_test_stat (int k
UNUSED
, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err)
{
double n_i, mean_i, var_i;
double n_j, mean_j, var_j;
{
double n_i, mean_i, var_i;
double n_j, mean_j, var_j;
@@
-298,32
+299,35
@@
static double lsd_test_stat (int k, const struct moments1 *mom_i, const struct m
static double scheffe_test_stat (int k, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err)
{
static double scheffe_test_stat (int k, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err)
{
+ double t;
double n_i, mean_i, var_i;
double n_j, mean_j, var_j;
moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0);
moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0);
double n_i, mean_i, var_i;
double n_j, mean_j, var_j;
moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0);
moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0);
-
double
t = (mean_i - mean_j) / std_err;
+ t = (mean_i - mean_j) / std_err;
t = pow2 (t);
t /= k - 1;
return t;
}
t = pow2 (t);
t /= k - 1;
return t;
}
-static double gh_test_stat (int k
, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err
)
+static double gh_test_stat (int k
UNUSED, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err UNUSED
)
{
{
+ double ts;
+ double thing;
double n_i, mean_i, var_i;
double n_j, mean_j, var_j;
moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0);
moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0);
double n_i, mean_i, var_i;
double n_j, mean_j, var_j;
moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0);
moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0);
-
double
thing = var_i / n_i + var_j / n_j;
+ thing = var_i / n_i + var_j / n_j;
thing /= 2.0;
thing = sqrt (thing);
thing /= 2.0;
thing = sqrt (thing);
-
double
ts = (mean_i - mean_j) / thing;
+ ts = (mean_i - mean_j) / thing;
return fabs (ts);
}
return fabs (ts);
}
@@
-1527,6
+1531,7
@@
show_comparisons (const struct oneway_spec *cmd, const struct oneway_workspace *
for (j = 0 ; j < pvw->n_groups; ++j)
{
for (j = 0 ; j < pvw->n_groups; ++j)
{
+ double std_err;
double weight_j, mean_j, var_j;
double half_range;
struct descriptive_data *dd_j = categoricals_get_user_data_by_category (cat, j);
double weight_j, mean_j, var_j;
double half_range;
struct descriptive_data *dd_j = categoricals_get_user_data_by_category (cat, j);
@@
-1542,7
+1547,7
@@
show_comparisons (const struct oneway_spec *cmd, const struct oneway_workspace *
tab_double (t, 3, r + rx, 0, mean_i - mean_j, 0);
tab_double (t, 3, r + rx, 0, mean_i - mean_j, 0);
-
double
std_err = pvw->mse;
+ std_err = pvw->mse;
std_err *= weight_i + weight_j;
std_err /= weight_i * weight_j;
std_err = sqrt (std_err);
std_err *= weight_i + weight_j;
std_err /= weight_i * weight_j;
std_err = sqrt (std_err);
diff --git
a/src/libpspp/inflate.c
b/src/libpspp/inflate.c
index 478747843b743869bd596fd39b97bba85e64cd7b..c4ad1cffc9022afb14ed8749d339dfcb66e909b6 100644
(file)
--- a/
src/libpspp/inflate.c
+++ b/
src/libpspp/inflate.c
@@
-99,6
+99,7
@@
inflate_init (struct zip_member *zm)
int
inflate_read (struct zip_member *zm, void *buf, size_t n)
{
int
inflate_read (struct zip_member *zm, void *buf, size_t n)
{
+ int r;
struct inflator *inf = zm->aux;
if (inf->zss.avail_in == 0)
struct inflator *inf = zm->aux;
if (inf->zss.avail_in == 0)
@@
-134,7
+135,7
@@
inflate_read (struct zip_member *zm, void *buf, size_t n)
inf->zss.avail_out = n;
inf->zss.next_out = buf;
inf->zss.avail_out = n;
inf->zss.next_out = buf;
-
int
r = inflate (&inf->zss, Z_NO_FLUSH);
+ r = inflate (&inf->zss, Z_NO_FLUSH);
if ( Z_OK == r)
{
return n - inf->zss.avail_out;
if ( Z_OK == r)
{
return n - inf->zss.avail_out;
diff --git
a/src/libpspp/temp-file.c
b/src/libpspp/temp-file.c
index 0391ec9c01f91ff1f3384e293c2d9b41102dabc0..9d3c392659753043667af822b9bbfe7bd3e1b0f0 100644
(file)
--- a/
src/libpspp/temp-file.c
+++ b/
src/libpspp/temp-file.c
@@
-55,7
+55,7
@@
static void
cleanup (void)
{
struct hmapx_node *node;
cleanup (void)
{
struct hmapx_node *node;
- c
onst c
har *fn;
+ char *fn;
cleanup_temp_dir (temp_dir);
cleanup_temp_dir (temp_dir);
diff --git
a/src/ui/gui/paired-dialog.c
b/src/ui/gui/paired-dialog.c
index 451c95f36a2c8edbfb9cb4655421ea1370a7a806..39a8ae91f196eb588c580d00c27917d69c9c41ad 100644
(file)
--- a/
src/ui/gui/paired-dialog.c
+++ b/
src/ui/gui/paired-dialog.c
@@
-143,16
+143,17
@@
two_sample_dialog_destroy (struct paired_samples_dialog *psd)
struct paired_samples_dialog *
two_sample_dialog_create (PsppireDataWindow *de)
{
struct paired_samples_dialog *
two_sample_dialog_create (PsppireDataWindow *de)
{
+ GtkWidget *dict_view ;
+ GtkWidget *selector ;
struct paired_samples_dialog *tt_d = g_malloc (sizeof *tt_d);
PsppireVarStore *vs = NULL;
tt_d->xml = builder_new ("paired-samples.ui");
struct paired_samples_dialog *tt_d = g_malloc (sizeof *tt_d);
PsppireVarStore *vs = NULL;
tt_d->xml = builder_new ("paired-samples.ui");
- GtkWidget *dict_view =
- get_widget_assert (tt_d->xml, "paired-samples-t-test-treeview1");
+ dict_view = get_widget_assert (tt_d->xml, "paired-samples-t-test-treeview1");
-
GtkWidget *
selector = get_widget_assert (tt_d->xml, "psppire-selector3");
+ selector = get_widget_assert (tt_d->xml, "psppire-selector3");
tt_d->dialog = get_widget_assert (tt_d->xml, "t-test-paired-samples-dialog");
tt_d->dialog = get_widget_assert (tt_d->xml, "t-test-paired-samples-dialog");