projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce77228
)
value: Avoid compiler warning for uninitialized data.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 9 Feb 2020 17:55:25 +0000
(17:55 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 9 Feb 2020 17:56:48 +0000
(17:56 +0000)
src/data/value.h
patch
|
blob
|
history
diff --git
a/src/data/value.h
b/src/data/value.h
index 8e624a8464b73163e9638c88c26dff5fa6a444cd..4c4349de8afb0cd480221675caf84dbd9daec50e 100644
(file)
--- a/
src/data/value.h
+++ b/
src/data/value.h
@@
-80,6
+80,8
@@
value_init (union value *v, int width)
{
if (width > 0)
v->s = xmalloc (width);
+ else
+ v->f = 0.0;
}
/* Initializes V as a value of the given WIDTH, as with value_init(), and