]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
travis: coverity gets confused about the %m printf extension in glibc 3384/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 15 Apr 2020 19:27:53 +0000 (21:27 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 15 Apr 2020 19:27:53 +0000 (21:27 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
.travis.yml
configure.ac
src/lxc/log.h

index b3050fe2b6793a47b6d9cfca678db99fea4c4e8f..2d41aaaa7a4c7a4b37d653d1827bdd3fe51ac143 100644 (file)
@@ -37,6 +37,6 @@ addons:
     # Where email notification of build analysis results will be sent
     notification_email: christian.brauner@ubuntu.com
 
-    build_command_prepend: "./autogen.sh && mkdir build && cd build && ../configure --enable-tests --with-distro=unknown --disable-rpath --enable-tests --enable-memfd-rexec --enable-seccomp --enable-static --enable-werror"
+    build_command_prepend: "./autogen.sh && mkdir build && cd build && ../configure --enable-coverity-build --enable-tests --with-distro=unknown --disable-rpath --enable-tests --enable-memfd-rexec --enable-seccomp --enable-static --enable-werror"
     build_command: "make -j4"
     branch_pattern: master
index fdc57493ca8ee94337a4c4e899ed57bae7ead8a3..232c6315e89badfcc184371e9972323b22f75a85 100644 (file)
@@ -767,6 +767,11 @@ AC_ARG_ENABLE([thread-safety],
        [enable_thread_safety=$enableval], [enable_thread_safety=yes])
 AM_CONDITIONAL([ENFORCE_THREAD_SAFETY], [test "x$enable_thread_safety" = "xyes"])
 
+AC_ARG_ENABLE([coverity-build],
+       [AS_HELP_STRING([--enable-coverity-build], [handle coverity builds [default=no]])],
+       [enable_coverity_build=$enableval], [enable_coverity_build=yes])
+AM_CONDITIONAL([ENABLE_COVERITY_BUILD], [test "x$enable_coverity_build" = "xyes"])
+
 AC_ARG_ENABLE([dlog],
        [AS_HELP_STRING([--enable-dlog], [enable dlog support [default=no]])],
        [enable_dlog=$enableval], [enable_dlog=no])
index 881e97130dd7cee7176763295d5eb61fb9e9d9ee..a8d27bdde07d0188172ab0725d10233932742c2c 100644 (file)
@@ -391,7 +391,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,        \
        LXC_FATAL(&locinfo, format, ##__VA_ARGS__);                     \
 } while (0)
 
-#if HAVE_M_FORMAT
+#if HAVE_M_FORMAT && !ENABLE_COVERITY_BUILD
 #define SYSTRACE(format, ...)                              \
                TRACE("%m - " format, ##__VA_ARGS__)
 #else
@@ -402,7 +402,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,        \
        } while (0)
 #endif
 
-#if HAVE_M_FORMAT
+#if HAVE_M_FORMAT && !ENABLE_COVERITY_BUILD
 #define SYSDEBUG(format, ...)                              \
                 DEBUG("%m - " format, ##__VA_ARGS__)
 #else
@@ -414,7 +414,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,        \
 #endif
 
 
-#if HAVE_M_FORMAT
+#if HAVE_M_FORMAT && !ENABLE_COVERITY_BUILD
 #define SYSINFO(format, ...)                              \
                 INFO("%m - " format, ##__VA_ARGS__)
 #else
@@ -425,7 +425,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,        \
        } while (0)
 #endif
 
-#if HAVE_M_FORMAT
+#if HAVE_M_FORMAT && !ENABLE_COVERITY_BUILD
 #define SYSNOTICE(format, ...)                              \
                NOTICE("%m - " format, ##__VA_ARGS__)
 #else
@@ -436,7 +436,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,        \
        } while (0)
 #endif
 
-#if HAVE_M_FORMAT
+#if HAVE_M_FORMAT && !ENABLE_COVERITY_BUILD
 #define SYSWARN(format, ...)                              \
                WARN("%m - " format, ##__VA_ARGS__)
 #else
@@ -447,7 +447,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,        \
        } while (0)
 #endif
 
-#if HAVE_M_FORMAT
+#if HAVE_M_FORMAT && !ENABLE_COVERITY_BUILD
 #define SYSERROR(format, ...)                              \
                ERROR("%m - " format, ##__VA_ARGS__)
 #else
@@ -458,7 +458,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,        \
        } while (0)
 #endif
 
-#if HAVE_M_FORMAT
+#if HAVE_M_FORMAT && !ENABLE_COVERITY_BUILD
 #define CMD_SYSERROR(format, ...)                                             \
        fprintf(stderr, "%s: %d: %s - %m - " format "\n", __FILE__, __LINE__, \
                __func__, ##__VA_ARGS__);
@@ -471,7 +471,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,        \
        } while (0)
 #endif
 
-#if HAVE_M_FORMAT
+#if HAVE_M_FORMAT && !ENABLE_COVERITY_BUILD
 #define CMD_SYSINFO(format, ...)                                               \
        printf("%s: %d: %s - %m - " format "\n", __FILE__, __LINE__, __func__, \
               ##__VA_ARGS__);