Bladeren bron

[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 jaren geleden
bovenliggende
commit
65a3518013
1 gewijzigde bestanden met toevoegingen van 21 en 0 verwijderingen
  1. 21
    0
      contrib/coverity/model.c

+ 21
- 0
contrib/coverity/model.c Bestand weergeven

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

Laden…
Annuleren
Opslaan