mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-11-26 16:26:02 +03:00
src: rework static analysis detection
Inspired by QEMU code. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -29,6 +29,10 @@
|
||||
#include <stdlib.h>
|
||||
#include "glibcompat.h"
|
||||
|
||||
#if defined __clang_analyzer__ || defined __COVERITY__
|
||||
# define STATIC_ANALYSIS 1
|
||||
#endif
|
||||
|
||||
#if STATIC_ANALYSIS
|
||||
# undef NDEBUG /* Don't let a prior NDEBUG definition cause trouble. */
|
||||
# include <assert.h>
|
||||
|
||||
Reference in New Issue
Block a user