From 5aec8fe54e47dbffc9ed705e4211f935bdca1550 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 5 Aug 2020 23:53:40 +0200 Subject: [PATCH] _sd-common.h: avoid parsing errors with Coverity The commit 1070d271fa8fa553d57dd5f74dd1e3f60732d0b9 which was supposed too fix this does not seem to take effect any more. We get again 34% compilation success rate while scanning systemd itself. Moreover, the installed header file breaks compilation of programs that include it: "/usr/include/systemd/_sd-common.h", line 23: error #35: #error directive: "Do not include _sd-common.h directly; it is a private header." # error "Do not include _sd-common.h directly; it is a private header." ^ (cherry picked from commit 4191b3282afbca9f1ef333f91bb6566c374da1fe) --- src/systemd/_sd-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemd/_sd-common.h b/src/systemd/_sd-common.h index 8158ee733e..1055b00d07 100644 --- a/src/systemd/_sd-common.h +++ b/src/systemd/_sd-common.h @@ -19,7 +19,7 @@ /* This is a private header; never even think of including this directly! */ -#if defined(__INCLUDE_LEVEL__) && __INCLUDE_LEVEL__ <= 1 +#if defined(__INCLUDE_LEVEL__) && __INCLUDE_LEVEL__ <= 1 && !defined(__COVERITY__) # error "Do not include _sd-common.h directly; it is a private header." #endif -- 2.25.1