summaryrefslogtreecommitdiff
path: root/cord
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2016-09-01 17:00:37 +0300
committerIvan Maidanski <ivmai@mail.ru>2016-09-01 17:00:37 +0300
commit3fea666ef34f90b2c04095274c449b0b7978d756 (patch)
treef7d11635bc8c76ca8463c8718fcd146b5b908264 /cord
parentc54aba1c5feb77ad9b111a990481e8a5be29954c (diff)
downloadbdwgc-3fea666ef34f90b2c04095274c449b0b7978d756.tar.gz
Workaround 'struct member Generic::null never used' cppcheck style warning
* cord/cordbscs.c (CORD_from_fn): Check that 'null' field of the allocated Function object is zero.
Diffstat (limited to 'cord')
-rw-r--r--cord/cordbscs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cord/cordbscs.c b/cord/cordbscs.c
index efe75b54..d6c33ee9 100644
--- 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;