projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c54aba1
)
Workaround 'struct member Generic::null never used' cppcheck style warning
author
Ivan Maidanski
<ivmai@mail.ru>
Thu, 1 Sep 2016 14:00:37 +0000
(17:00 +0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Thu, 1 Sep 2016 14:00:37 +0000
(17:00 +0300)
* cord/cordbscs.c (CORD_from_fn): Check that 'null' field of the
allocated Function object is zero.
cord/cordbscs.c
patch
|
blob
|
history
diff --git
a/cord/cordbscs.c
b/cord/cordbscs.c
index
efe75b5
..
d6c33ee
100644
(file)
--- a/
cord/cordbscs.c
+++ b/
cord/cordbscs.c
@@
-306,6
+306,7
@@
CORD CORD_from_fn(CORD_fn fn, void * client_data, size_t len)
result = GC_NEW(struct Function);
if (result == 0) OUT_OF_MEMORY;
+ if (result->null != 0) ABORT("error"); /* make 'null' field used */
result->header = FN_HDR;
/* depth is already 0 */
result->len = len;