projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5e3339
)
value: Suppress uninitialized tmp.s warning in value_resize().
author
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 31 Aug 2020 17:29:52 +0000
(10:29 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 31 Aug 2020 18:03:32 +0000
(11:03 -0700)
This warning is wrong, but it should not cause a performance problem to
avoid it. Encountered with GCC 10.x.
src/data/value.c
patch
|
blob
|
history
diff --git
a/src/data/value.c
b/src/data/value.c
index bbe96b19805a7060945e26bc6eb1ec4d60810583..55a1e55e859952118fa45965d0d376aa85e625d5 100644
(file)
--- a/
src/data/value.c
+++ b/
src/data/value.c
@@
-161,7
+161,7
@@
void
value_resize (union value *value, int old_width, int new_width)
{
assert (value_is_resizable (value, old_width, new_width));
- if (new_width != old_width)
+ if (new_width != old_width
&& new_width > 0
)
{
union value tmp;
value_init (&tmp, new_width);