diff --git a/src/examples/libpmemobj/pmemobjfs/pmemobjfs.c b/src/examples/libpmemobj/pmemobjfs/pmemobjfs.c index a4374717c73..a3d4ae6d4e9 100644 --- a/src/examples/libpmemobj/pmemobjfs/pmemobjfs.c +++ b/src/examples/libpmemobj/pmemobjfs/pmemobjfs.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -/* Copyright 2015-2019, Intel Corporation */ +/* Copyright 2015-2022, Intel Corporation */ /* * pmemobjfs.c -- simple filesystem based on libpmemobj tx API @@ -2210,7 +2210,7 @@ parse_size(const char *str, uint64_t *sizep) { uint64_t size = 0; int shift = 0; - char unit[3] = {0}; + char unit[4] = {0}; int ret = sscanf(str, "%lu%3s", &size, unit); if (ret <= 0) return -1; diff --git a/src/libpmem/pmem.h b/src/libpmem/pmem.h index 7cf6bf13cfa..ad5d75fcbac 100644 --- a/src/libpmem/pmem.h +++ b/src/libpmem/pmem.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright 2014-2020, Intel Corporation */ +/* Copyright 2014-2022, Intel Corporation */ /* * pmem.h -- internal definitions for libpmem @@ -41,6 +41,8 @@ static inline void pmem_inject_fault_at(enum pmem_allocation_type type, int nth, const char *at) { + SUPPRESS_UNUSED(type, nth, at); + abort(); }