浏览代码

[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
+}

正在加载...
取消
保存