summaryrefslogtreecommitdiffstats
path: root/contrib/coverity
diff options
context:
space:
mode:
authorMichael Brown2017-03-22 15:46:03 +0100
committerMichael Brown2017-03-22 15:46:03 +0100
commit65a3518013ec9ae97c9eb824cb89452111f8a7c0 (patch)
treea6686da2f0cb00ea73c745ea219c0aa410e69607 /contrib/coverity
parent[mucurses] Ensure SLK labels are always terminated (diff)
downloadipxe-65a3518013ec9ae97c9eb824cb89452111f8a7c0.tar.gz
ipxe-65a3518013ec9ae97c9eb824cb89452111f8a7c0.tar.xz
ipxe-65a3518013ec9ae97c9eb824cb89452111f8a7c0.zip
[coverity] Add Coverity user model
Add a trivial model file to prevent Coverity from making various incorrect assumptions about functions where the iPXE behaviour diverges from POSIX or Linux norms. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'contrib/coverity')
-rw-r--r--contrib/coverity/model.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/coverity/model.c b/contrib/coverity/model.c
new file mode 100644
index 00000000..15535d42
--- /dev/null
+++ b/contrib/coverity/model.c
@@ -0,0 +1,21 @@
+/*
+ * Coverity modelling file
+ *
+ */
+
+typedef long off_t;
+typedef void * userptr_t;
+typedef long long time_t;
+struct tm;
+
+/* Inhibit use of built-in models for functions where Coverity's
+ * assumptions about the modelled function are incorrect for iPXE.
+ */
+char * strerror ( int errno ) {
+}
+void copy_from_user ( void *dest, userptr_t src, off_t src_off, size_t len ) {
+}
+time_t mktime ( struct tm *tm ) {
+}
+int getchar ( void ) {
+}