Fix -Wunused-function warnings

This commit is contained in:
Khaled Hosny 2023-01-26 13:21:41 +02:00
parent 23e2718bd7
commit a74ef93d82
6 changed files with 6 additions and 75 deletions

View file

@ -52,19 +52,6 @@
#include "cairo-composite-rectangles-private.h"
#include "cairo-region-private.h"
static inline int
pot (int v)
{
v--;
v |= v >> 1;
v |= v >> 2;
v |= v >> 4;
v |= v >> 8;
v |= v >> 16;
v++;
return v;
}
static cairo_bool_t
_cairo_clip_contains_rectangle_box (const cairo_clip_t *clip,
const cairo_rectangle_int_t *rect,

View file

@ -85,21 +85,6 @@ struct mono_scan_converter {
#define I(x) _cairo_fixed_integer_round_down(x)
/* Compute the floored division a/b. Assumes / and % perform symmetric
* division. */
inline static struct quorem
floored_divrem(int a, int b)
{
struct quorem qr;
qr.quo = a/b;
qr.rem = a%b;
if ((a^b)<0 && qr.rem) {
qr.quo -= 1;
qr.rem += b;
}
return qr;
}
/* Compute the floored division (x*a)/b. Assumes / and % perform symmetric
* division. */
static struct quorem
@ -377,15 +362,6 @@ row (struct mono_scan_converter *c, unsigned int mask)
}
}
inline static void dec (struct edge *e, int h)
{
e->height_left -= h;
if (e->height_left == 0) {
e->prev->next = e->next;
e->next->prev = e->prev;
}
}
static cairo_status_t
_mono_scan_converter_init(struct mono_scan_converter *c,
int xmin, int ymin,

View file

@ -142,17 +142,6 @@ slope_compare_sgn (double dx1, double dy1, double dx2, double dy2)
return 0;
}
static inline int
range_step (int i, int step, int max)
{
i += step;
if (i < 0)
i = max - 1;
if (i >= max)
i = 0;
return i;
}
/*
* Construct a fan around the midpoint using the vertices from pen between
* inpt and outpt.

View file

@ -214,17 +214,6 @@ _cairo_slope_compare_sgn (double dx1, double dy1, double dx2, double dy2)
return 0;
}
static inline int
_range_step (int i, int step, int max)
{
i += step;
if (i < 0)
i = max - 1;
if (i >= max)
i = 0;
return i;
}
/*
* Construct a fan around the midpoint using the vertices from pen between
* inpt and outpt.

View file

@ -622,16 +622,6 @@ cell_list_rewind (struct cell_list *cells)
cells->cursor = &cells->head;
}
inline static void
cell_list_maybe_rewind (struct cell_list *cells, int x)
{
if (x < cells->cursor->x) {
cells->cursor = cells->rewind;
if (x < cells->cursor->x)
cells->cursor = &cells->head;
}
}
inline static void
cell_list_set_rewind (struct cell_list *cells)
{

View file

@ -4882,12 +4882,6 @@ cairo_image_surface_create_from_png_stream (cairo_read_func_t read_func, void *c
}
#endif
static const char *
_content_from_surface (cairo_surface_t *surface)
{
return _content_to_string (DLCALL (cairo_surface_get_content, surface));
}
#if CAIRO_HAS_TEE_SURFACE
#include <cairo-tee.h>
@ -4925,6 +4919,12 @@ cairo_tee_surface_create (cairo_surface_t *master)
#if CAIRO_HAS_XLIB_SURFACE
#include <cairo-xlib.h>
static const char *
_content_from_surface (cairo_surface_t *surface)
{
return _content_to_string (DLCALL (cairo_surface_get_content, surface));
}
cairo_surface_t *
cairo_xlib_surface_create (Display *dpy,
Drawable drawable,