From a74ef93d8221b37af60290abfc4f15214111d3cd Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 26 Jan 2023 13:21:41 +0200 Subject: Fix -Wunused-function warnings --- src/cairo-clip-boxes.c | 13 ------------- src/cairo-mono-scan-converter.c | 24 ------------------------ src/cairo-path-stroke-polygon.c | 11 ----------- src/cairo-path-stroke.c | 11 ----------- src/cairo-tor22-scan-converter.c | 10 ---------- 5 files changed, 69 deletions(-) (limited to 'src') diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c index aaddeb7f7..3ebcd509c 100644 --- a/src/cairo-clip-boxes.c +++ b/src/cairo-clip-boxes.c @@ -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, diff --git a/src/cairo-mono-scan-converter.c b/src/cairo-mono-scan-converter.c index 69168bd5d..32ddfcc51 100644 --- a/src/cairo-mono-scan-converter.c +++ b/src/cairo-mono-scan-converter.c @@ -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, diff --git a/src/cairo-path-stroke-polygon.c b/src/cairo-path-stroke-polygon.c index 44b6675e8..510ad3a6a 100644 --- a/src/cairo-path-stroke-polygon.c +++ b/src/cairo-path-stroke-polygon.c @@ -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. diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c index 837551273..9ebeb6cd3 100644 --- a/src/cairo-path-stroke.c +++ b/src/cairo-path-stroke.c @@ -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. diff --git a/src/cairo-tor22-scan-converter.c b/src/cairo-tor22-scan-converter.c index 79c858e4e..1e71a35b4 100644 --- a/src/cairo-tor22-scan-converter.c +++ b/src/cairo-tor22-scan-converter.c @@ -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) { -- cgit v1.2.1