mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 07:18:04 +02:00
[Makefile.am] Add target sparse to run sparse static source code analyzer
There are still some bits not quite working.
This commit is contained in:
parent
bfdc3b6642
commit
735757a17a
27 changed files with 59 additions and 22 deletions
|
|
@ -164,7 +164,7 @@ nodist_cairoinclude_HEADERS = \
|
|||
|
||||
lib_LTLIBRARIES = libcairo.la
|
||||
|
||||
libcairo_la_SOURCES = \
|
||||
libcairo_la_base_sources = \
|
||||
cairo.c \
|
||||
cairo.h \
|
||||
cairo-private.h \
|
||||
|
|
@ -174,7 +174,6 @@ libcairo_la_SOURCES = \
|
|||
cairo-base85-stream.c \
|
||||
cairo-bentley-ottmann.c \
|
||||
cairo-cache.c \
|
||||
cairo-cache-private.h \
|
||||
cairo-clip.c \
|
||||
cairo-clip-private.h \
|
||||
cairo-color.c \
|
||||
|
|
@ -193,7 +192,6 @@ libcairo_la_SOURCES = \
|
|||
cairo-lzw.c \
|
||||
cairo-matrix.c \
|
||||
cairo-mutex.c \
|
||||
cairo-mutex-list-private.h \
|
||||
cairo-mutex-private.h \
|
||||
cairo-mutex-type-private.h \
|
||||
cairo-operator.c \
|
||||
|
|
@ -220,7 +218,6 @@ libcairo_la_SOURCES = \
|
|||
cairo-surface-fallback-private.h \
|
||||
cairo-surface-private.h \
|
||||
cairo-traps.c \
|
||||
cairo-types-private.h \
|
||||
cairo-pattern.c \
|
||||
cairo-unicode.c \
|
||||
cairo-output-stream.c \
|
||||
|
|
@ -251,6 +248,19 @@ libcairo_la_SOURCES = \
|
|||
$(libcairo_directfb_sources) \
|
||||
cairoint.h
|
||||
|
||||
# source files that cannot be passed to compiler directly.
|
||||
# mostly when they depend recursively on cairoint.h. that is,
|
||||
# cairoint.h includes them in the middle.
|
||||
libcairo_la_special_sources = \
|
||||
cairo-cache-private.h \
|
||||
cairo-fixed-private.h \
|
||||
cairo-mutex-list-private.h \
|
||||
cairo-types-private.h
|
||||
|
||||
libcairo_la_SOURCES = \
|
||||
$(libcairo_la_base_sources) \
|
||||
$(libcairo_la_special_sources)
|
||||
|
||||
libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined $(export_symbols)
|
||||
|
||||
libcairo_la_CFLAGS = -I$(srcdir) $(CAIRO_CFLAGS)
|
||||
|
|
@ -301,5 +311,8 @@ TESTS_ENVIRONMENT = srcdir="$(srcdir)"
|
|||
TESTS = check-def.sh check-plt.sh check-headers.sh check-cairoint.sh
|
||||
EXTRA_DIST += $(TESTS)
|
||||
|
||||
sparse:
|
||||
sparse -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $(libcairo_la_base_sources)
|
||||
|
||||
splint:
|
||||
splint -badflag -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $(libcairo_la_SOURCES)
|
||||
splint -badflag -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $(libcairo_la_base_sources)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#ifndef CAIRO_CACHE_PRIVATE_H
|
||||
#define CAIRO_CACHE_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
#include "cairo-types-private.h"
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#ifndef CAIRO_CLIP_PRIVATE_H
|
||||
#define CAIRO_CLIP_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
#include "cairo-path-fixed-private.h"
|
||||
|
||||
extern const cairo_private cairo_rectangle_list_t _cairo_rectangles_nil;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#ifndef CAIRO_FIXED_PRIVATE_H
|
||||
#define CAIRO_FIXED_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
#include "cairo-wideint-private.h"
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#ifndef CAIRO_FT_PRIVATE_H
|
||||
#define CAIRO_FT_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
#include <cairo-ft.h>
|
||||
#include <cairoint.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#ifndef CAIRO_GSTATE_PRIVATE_H
|
||||
#define CAIRO_GSTATE_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
#include "cairo-clip-private.h"
|
||||
|
||||
struct _cairo_gstate {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#ifndef CAIRO_HASH_PRIVATE_H
|
||||
#define CAIRO_HASH_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
#include "cairo-types-private.h"
|
||||
|
||||
/* XXX: I'd like this file to be self-contained in terms of
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#ifndef CAIRO_MALLOC_PRIVATE_H
|
||||
#define CAIRO_MALLOC_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
#include "cairo-wideint-private.h"
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -41,9 +41,7 @@
|
|||
#ifndef CAIRO_MUTEX_PRIVATE_H
|
||||
#define CAIRO_MUTEX_PRIVATE_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include "cairoint.h"
|
||||
|
||||
#include <cairo-features.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -41,9 +41,7 @@
|
|||
#ifndef CAIRO_MUTEX_TYPE_PRIVATE_H
|
||||
#define CAIRO_MUTEX_TYPE_PRIVATE_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include "cairoint.h"
|
||||
|
||||
#include <cairo-features.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@
|
|||
#ifndef CAIRO_OS2_PRIVATE_H
|
||||
#define CAIRO_OS2_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
#define INCL_DOS
|
||||
#define INCL_DOSSEMAPHORES
|
||||
#define INCL_DOSERRORS
|
||||
|
|
@ -50,7 +52,6 @@
|
|||
#endif
|
||||
|
||||
#include <cairo-os2.h>
|
||||
#include <cairoint.h>
|
||||
|
||||
typedef struct _cairo_os2_surface
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#ifndef CAIRO_OUTPUT_STREAM_PRIVATE_H
|
||||
#define CAIRO_OUTPUT_STREAM_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
#include "cairo-types-private.h"
|
||||
|
||||
typedef cairo_status_t (*cairo_output_stream_write_func_t) (cairo_output_stream_t *output_stream,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#ifndef CAIRO_PAGINATED_SURFACE_H
|
||||
#define CAIRO_PAGINATED_SURFACE_H
|
||||
|
||||
#include "cairo.h"
|
||||
#include "cairoint.h"
|
||||
|
||||
#include "cairo-surface-private.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
#ifndef CAIRO_PATH_FIXED_PRIVATE_H
|
||||
#define CAIRO_PATH_FIXED_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
typedef enum cairo_path_op {
|
||||
CAIRO_PATH_OP_MOVE_TO = 0,
|
||||
CAIRO_PATH_OP_LINE_TO = 1,
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@
|
|||
#ifndef CAIRO_PDF_SURFACE_PRIVATE_H
|
||||
#define CAIRO_PDF_SURFACE_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
#include "cairo-pdf.h"
|
||||
|
||||
#include "cairo-surface-private.h"
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#ifndef CAIRO_PRIVATE_H
|
||||
#define CAIRO_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
#include "cairo-gstate-private.h"
|
||||
#include "cairo-path-fixed-private.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@
|
|||
#ifndef CAIRO_PS_SURFACE_PRIVATE_H
|
||||
#define CAIRO_PS_SURFACE_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
#include "cairo-ps.h"
|
||||
|
||||
#include "cairo-surface-private.h"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#ifndef CAIRO_QUARTZ_PRIVATE_H
|
||||
#define CAIRO_QUARTZ_PRIVATE_H
|
||||
|
||||
#include <cairoint.h>
|
||||
#include "cairoint.h"
|
||||
|
||||
#ifdef CAIRO_HAS_QUARTZ_SURFACE
|
||||
#include <cairo-quartz.h>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
#ifndef CAIRO_REGION_PRIVATE_H
|
||||
#define CAIRO_REGION_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
#include <pixman.h>
|
||||
|
||||
/* cairo_region_t is defined in cairoint.h */
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#ifndef CAIRO_SCALED_FONT_PRIVATE_H
|
||||
#define CAIRO_SCALED_FONT_PRIVATE_H
|
||||
|
||||
#include "cairo.h"
|
||||
#include "cairoint.h"
|
||||
|
||||
#include "cairo-types-private.h"
|
||||
#include "cairo-mutex-type-private.h"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#ifndef CAIRO_SURFACE_PRIVATE_H
|
||||
#define CAIRO_SURFACE_PRIVATE_H
|
||||
|
||||
#include "cairo.h"
|
||||
#include "cairoint.h"
|
||||
|
||||
#include "cairo-types-private.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@
|
|||
#ifndef CAIRO_SVG_SURFACE_PRIVATE_H
|
||||
#define CAIRO_SVG_SURFACE_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
#include "cairo-svg.h"
|
||||
|
||||
#include "cairo-surface-private.h"
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
#ifndef CAIRO_TYPE1_PRIVATE_H
|
||||
#define CAIRO_TYPE1_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
/* Magic constants for the type1 eexec encryption */
|
||||
#define CAIRO_TYPE1_ENCRYPT_C1 ((unsigned short) 52845)
|
||||
#define CAIRO_TYPE1_ENCRYPT_C2 ((unsigned short) 22719)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@
|
|||
#ifndef CAIRO_TYPES_PRIVATE_H
|
||||
#define CAIRO_TYPES_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
typedef struct _cairo_array cairo_array_t;
|
||||
struct _cairo_array {
|
||||
unsigned int size;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
#ifndef CAIRO_WIDEINT_H
|
||||
#define CAIRO_WIDEINT_H
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
#if HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#elif HAVE_INTTYPES_H
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@
|
|||
#ifndef CAIRO_XLIB_SURFACE_PRIVATE_H
|
||||
#define CAIRO_XLIB_SURFACE_PRIVATE_H
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
#include "cairo-xlib.h"
|
||||
|
||||
#include "cairo-surface-private.h"
|
||||
|
|
|
|||
|
|
@ -179,11 +179,6 @@ do { \
|
|||
|
||||
#define CAIRO_REF_COUNT_INVALID ((unsigned int) -1)
|
||||
|
||||
#include "cairo-mutex-private.h"
|
||||
#include "cairo-wideint-private.h"
|
||||
#include "cairo-malloc-private.h"
|
||||
#include "cairo-fixed-private.h"
|
||||
|
||||
#define CAIRO_ALPHA_IS_OPAQUE(alpha) ((alpha) >= ((double)0xff00 / (double)0xffff))
|
||||
#define CAIRO_ALPHA_SHORT_IS_OPAQUE(alpha) ((alpha) >= 0xff00)
|
||||
#define CAIRO_ALPHA_IS_ZERO(alpha) ((alpha) <= 0.0)
|
||||
|
|
@ -238,8 +233,8 @@ be32_to_cpu(uint32_t v)
|
|||
#endif
|
||||
|
||||
#include "cairo-types-private.h"
|
||||
#include "cairo-hash-private.h"
|
||||
#include "cairo-cache-private.h"
|
||||
#include "cairo-fixed-private.h"
|
||||
|
||||
typedef struct _cairo_region cairo_region_t;
|
||||
|
||||
|
|
@ -2456,4 +2451,9 @@ slim_hidden_proto (cairo_surface_write_to_png_stream);
|
|||
|
||||
CAIRO_END_DECLS
|
||||
|
||||
#include "cairo-mutex-private.h"
|
||||
#include "cairo-wideint-private.h"
|
||||
#include "cairo-malloc-private.h"
|
||||
#include "cairo-hash-private.h"
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue