瀏覽代碼

[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>
tags/v1.20.1
Michael Brown 7 年之前
父節點
當前提交
65a3518013
共有 1 個檔案被更改,包括 21 行新增0 行删除
  1. 21
    0
      contrib/coverity/model.c

+ 21
- 0
contrib/coverity/model.c 查看文件

@@ -0,0 +1,21 @@
1
+/*
2
+ * Coverity modelling file
3
+ *
4
+ */
5
+
6
+typedef long off_t;
7
+typedef void * userptr_t;
8
+typedef long long time_t;
9
+struct tm;
10
+
11
+/* Inhibit use of built-in models for functions where Coverity's
12
+ * assumptions about the modelled function are incorrect for iPXE.
13
+ */
14
+char * strerror ( int errno ) {
15
+}
16
+void copy_from_user ( void *dest, userptr_t src, off_t src_off, size_t len ) {
17
+}
18
+time_t mktime ( struct tm *tm ) {
19
+}
20
+int getchar ( void ) {
21
+}

Loading…
取消
儲存