From 3ff5dc33e2d41e5d338ec1b604a1ecb41d82b2db Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Mon, 19 Dec 2016 11:09:02 -0200 Subject: [PATCH] coverity: add modeling file to reduce false positives. --- data/coverity/model.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 data/coverity/model.c diff --git a/data/coverity/model.c b/data/coverity/model.c new file mode 100644 index 0000000000..f32daa39af --- /dev/null +++ b/data/coverity/model.c @@ -0,0 +1,26 @@ +/* + * Coverity Model - not a real source file. + * + * See https://scan.coverity.com/tune + * See https://scan.coverity.com/models + * + * Coverity doesn't detect changes to this file, update manually at: + * + * https://scan.coverity.com/projects/enlightenment-foundation-libraries?tab=analysis_settings + */ + +typedef struct { + int fd; +} Eo; + +/* force Coverity to understand these take ownership of fd */ + +void efl_loop_fd_set(Eo *obj, int fd) +{ + obj->fd = fd; +} + +void efl_loop_fd_file_set(Eo *obj, int fd) +{ + obj->fd = fd; +}