summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2023-02-02 17:32:50 +0100
committerAndreas Schneider <asn@cryptomilk.org>2023-02-02 17:33:30 +0100
commitbd266eb4069226bc17e0be832ebe24cef15104c3 (patch)
tree132c455d2bad0b4f52d2b79a8929d2ce7f64a4a5
parent4e8a7cd58176274c3df8a29e4644decdf2172a33 (diff)
downloadcmocka-bd266eb4069226bc17e0be832ebe24cef15104c3.zip
cmocka-bd266eb4069226bc17e0be832ebe24cef15104c3.tar.gz
cmocka-bd266eb4069226bc17e0be832ebe24cef15104c3.tar.bz2
coverity: Add missing type definitions
-rw-r--r--coverity/coverity_assert_model.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/coverity/coverity_assert_model.c b/coverity/coverity_assert_model.c
index c635479..04878ec 100644
--- a/coverity/coverity_assert_model.c
+++ b/coverity/coverity_assert_model.c
@@ -1,3 +1,25 @@
+/*
+ * Modelling file for Coverity Scan
+ *
+ * This is a modeling file for Coverity Scan. Modeling helps to avoid false
+ * positives.
+ *
+ * - A model file can't import any header files.
+ * - Therefore only some built-in primitives like int, char and void are
+ * available but not NULL etc.
+ * - Modeling doesn't need full structs and typedefs. Rudimentary structs
+ * and similar types are sufficient.
+ * - An uninitialized local pointer is not an error. It signifies that the
+ * variable could be either NULL or have some data.
+ *
+ * Coverity Scan doesn't pick up modifications automatically. The model file
+ * must be uploaded by an admin.
+ */
+
+typedef long long intmax_t;
+typedef unsigned long long uintmax_t;
+typedef unsigned long long size_t;
+
void _assert_true(const uintmax_t result,
const char* const expression,
const char * const file, const int line)