projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d775f57
)
ONEWAY: Fix declaration-after-statement warning.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 18 Sep 2010 04:17:43 +0000
(21:17 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 18 Sep 2010 13:51:41 +0000
(06:51 -0700)
C90 requires declarations to precede statements within a block.
src/language/stats/oneway.c
patch
|
blob
|
history
diff --git
a/src/language/stats/oneway.c
b/src/language/stats/oneway.c
index ba7fc5b2a1102a2fcba010f06c21d0811425ef2a..aa8a255211192852f78318940d68179e046ec28c 100644
(file)
--- a/
src/language/stats/oneway.c
+++ b/
src/language/stats/oneway.c
@@
-360,14
+360,14
@@
updateit (void *user_data,
const union value *valx = case_data (c, varp);
+ struct descriptive_data *dd_total = aux2;
+
+ double weight;
+
if ( var_is_value_missing (varp, valx, exclude))
return;
- struct descriptive_data *dd_total = aux2;
-
- double weight = 1.0;
- if (wv)
- weight = case_data (c, wv)->f;
+ weight = wv != NULL ? case_data (c, wv)->f : 1.0;
moments1_add (dd->mom, valx->f, weight);
if (valx->f * weight < dd->minimum)