[cairo-commit] 2 commits - src/cairo-clip-boxes.c src/cairo-mono-scan-converter.c src/cairo-path-stroke.c src/cairo-path-stroke-polygon.c src/cairo-tor22-scan-converter.c util/cairo-trace

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Mar 3 15:50:34 UTC 2023


 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 ----------
 util/cairo-trace/trace.c         |   12 ++++++------
 6 files changed, 6 insertions(+), 75 deletions(-)

New commits:
commit af5a25a7f19e8fe6242c50f17bd246f98b6fdf87
Merge: 3b178e858 a74ef93d8
Author: Uli Schlachter <psychon at znc.in>
Date:   Fri Mar 3 15:50:32 2023 +0000

    Merge branch 'unused-function' into 'master'
    
    Fix -Wunused-function warnings
    
    See merge request cairo/cairo!449

commit a74ef93d8221b37af60290abfc4f15214111d3cd
Author: Khaled Hosny <khaled at aliftype.com>
Date:   Thu Jan 26 13:21:41 2023 +0200

    Fix -Wunused-function warnings

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)
 {
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index 7ccdc41dc..1bdb07591 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -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,


More information about the cairo-commit mailing list