unsigned int index,
void *dst)
{
- void *src = _cairo_array_index_const (array, index);
+ void *src = (void *)_cairo_array_index_const (array, index);
if(src != NULL)
memcpy (dst, src, array->element_size);
}
return qr;
}
+/*
+ # to avoid warning : defined but not used [-Wunused-function]
static struct quorem
floored_muldivrem(int x, int a, int b)
{
}
return qr;
}
+*/
static cairo_fixed_t
line_compute_intersection_x_for_y (const cairo_line_t *line,
return status;
}
+/*
+# to avoid warning : defined but not used [-Wunused-function]
static edge_t *
botor_allocate_edge (cairo_botor_scan_converter_t *self)
{
return CAIRO_STATUS_SUCCESS;
}
+*/
static void
_cairo_botor_scan_converter_destroy (void *converter)
_cairo_gl_composite_flush (ctx);
_cairo_gl_context_destroy_operand (ctx, ctx->max_textures - 1);
}
- if (ctx->states_cache.active_texture != ctx->max_textures - 1) {
+ if (ctx->states_cache.active_texture != (GLenum)(ctx->max_textures - 1)) {
ctx->dispatch.ActiveTexture (ctx->max_textures - 1);
ctx->states_cache.active_texture = ctx->max_textures - 1;
}
cairo_gl_surface_t *surface)
{
#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_EVASGL_SURFACE
- cairo_bool_t stencil_test_enabled, scissor_test_enabled;
- cairo_bool_t has_stencil_cache;
+ cairo_bool_t stencil_test_enabled = FALSE, scissor_test_enabled = FALSE;
+ cairo_bool_t has_stencil_cache = FALSE;
GLbitfield mask;
if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP) {
}
else
{
- _cairo_device_set_error (device, CAIRO_STATUS_INVALID_STATUS);
+ cairo_status_t ret;
+ ret = _cairo_device_set_error (device, CAIRO_STATUS_INVALID_STATUS);
return;
}
}
return (width + 7) & -8;
}
+/*
+ # to avoid warning : defined but not used [-Wunused-function]
static uint8_t premultiply(double c, double a)
{
int v = c * a * 256;
else
return a << 0 | r << 8 | g << 16 | b << 24;
}
+*/
static cairo_status_t
_cairo_gl_gradient_render (const cairo_gl_context_t *ctx,
{
int version = _cairo_gl_get_version (dispatch);
if (version >= CAIRO_GL_VERSION_ENCODE (3, 0)) {
- GLuint max_num_extensions;
+ GLint max_num_extensions;
int i;
dispatch->GetIntegerv (GL_NUM_EXTENSIONS, &max_num_extensions);
- for (i = 0; i < max_num_extensions; i++) {
+ for (i = 0; i < (int)max_num_extensions; i++) {
const char *extension = (const char *) dispatch->GetStringi (GL_EXTENSIONS, i);
if (strstr (extension, ext) == 0)
return TRUE;
quad);
}
+/*
+ # to avoid warning : defined but not used [-Wunused-function]
static cairo_bool_t
_is_continuous_arc (const cairo_path_fixed_t *path,
const cairo_stroke_style_t *style)
return (_cairo_path_fixed_is_single_arc (path) &&
style->dash == NULL);
}
+*/
static cairo_int_status_t
_prevent_overlapping_strokes (cairo_gl_context_t *ctx,
if ((ctx->vao != 0 &&
(ctx->vao != ctx->states_cache.bound_vao))) {
ctx->dispatch.GetIntegerv (GL_VERTEX_ARRAY_BINDING, &vao);
- if (vao != ctx->states_cache.bound_vao) {
+ if (vao != (GLint)ctx->states_cache.bound_vao) {
ctx->dispatch.BindVertexArray (ctx->vao);
ctx->states_cache.bound_vao = ctx->vao;
if ((ctx->vbo != 0 &&
(ctx->vbo != ctx->states_cache.bound_vbo))) {
ctx->dispatch.GetIntegerv (GL_ARRAY_BUFFER_BINDING, &vbo);
- if (vbo != (GLint) ctx->states_cache.bound_vbo) {
+ if (vbo != (GLint)ctx->states_cache.bound_vbo) {
ctx->dispatch.BindBuffer (GL_ARRAY_BUFFER, ctx->vbo);
}
ctx->states_cache.bound_vbo = ctx->vbo;
if ((ctx->ibo != 0 &&
(ctx->ibo != ctx->states_cache.bound_ibo))) {
ctx->dispatch.GetIntegerv (GL_ELEMENT_ARRAY_BUFFER_BINDING, &ibo);
- if (ibo != (GLint) ctx->states_cache.bound_ibo) {
+ if (ibo != (GLint)ctx->states_cache.bound_ibo) {
ctx->dispatch.BindBuffer (GL_ELEMENT_ARRAY_BUFFER, ctx->ibo);
}
ctx->states_cache.bound_ibo = ctx->ibo;
return status;
}
+/*
+ # to avoid warning : defined but not used [-Wunused-function]
static int _cairo_gl_surface_flavor (cairo_gl_surface_t *surface)
{
cairo_gl_context_t *ctx = (cairo_gl_context_t *)surface->base.device;
return ctx->gl_flavor;
}
+*/
static cairo_status_t
_cairo_gl_surface_finish (void *abstract_surface)
cairo_box_t bounds;
} cairo_stroker_t;
+/*
+ # to avoid warning : defined but not used [-Wunused-function]
static cairo_bool_t
_cairo_stroke_segment_intersect (cairo_point_t *p1, cairo_point_t *p2,
cairo_point_t *p3, cairo_point_t *p4,
x = (pre * (x3 - x4) - (x1 - x2) * post) / d;
y = (pre * (y3 - y4) - (y1 - y2) * post) / d;
- /* check if x, y are within both segments */
+ // check if x, y are within both segments
if (x < MIN (x1, x2) || x > MAX (x1, x2) ||
x < MIN (x3, x4) || x > MAX (x3, x4))
return FALSE;
p->y = _cairo_fixed_from_double (y);
return TRUE;
}
+*/
static void
_cairo_stroker_limit (cairo_stroker_t *stroker,
*pattern = *other;
_cairo_array_init (&pattern->patches, sizeof (cairo_mesh_patch_t));
- data = _cairo_array_index_const (&other->patches, 0);
+ data = (void *)_cairo_array_index_const (&other->patches, 0);
if (data == NULL)
return CAIRO_STATUS_NULL_POINTER;
return _cairo_array_append_multiple (&pattern->patches,
HAVE_BX = 0x2,
HAVE_BOTH = HAVE_AX | HAVE_BX
} have_ax_bx = HAVE_BOTH;
- int32_t ax, bx;
+ int32_t ax = 0, bx = 0;
if (y == a->edge.line.p1.y)
ax = a->edge.line.p1.x;
HAVE_BX = 0x2,
HAVE_BOTH = HAVE_AX | HAVE_BX
} have_ax_bx = HAVE_BOTH;
- int32_t ax, bx;
+ int32_t ax = 0, bx = 0;
if (y == a->edge.line.p1.y)
ax = a->edge.line.p1.x;
if (pad_image->status) {
status = pad_image->status;
cairo_surface_destroy (pad_image);
- status;
+ //status;
}
_cairo_pattern_init_for_surface (&pad_pattern, &source->base);
stream = _cairo_output_stream_create_for_filename (filename);
if ((status = _cairo_output_stream_get_status (stream))) {
- _cairo_output_stream_destroy (stream);
+ cairo_status_t ret;
+ ret = _cairo_output_stream_destroy (stream);
return _cairo_device_create_in_error (status);
}
stream = _cairo_output_stream_create (write_func, NULL, closure);
if ((status = _cairo_output_stream_get_status (stream))) {
- _cairo_output_stream_destroy (stream);
+ cairo_status_t ret;
+ ret = _cairo_output_stream_destroy (stream);
return _cairo_device_create_in_error (status);
}
null_stream = _cairo_null_stream_create ();
if (unlikely (null_stream->status)) {
status = null_stream->status;
- _cairo_output_stream_destroy (null_stream);
+ cairo_status_t ret;
+ ret = _cairo_output_stream_destroy (null_stream);
return status;
}
mem_stream = _cairo_memory_stream_create ();
status = mem_stream->status;
if (unlikely (status)) {
- _cairo_output_stream_destroy (mem_stream);
+ cairo_status_t ret;
+ ret = _cairo_output_stream_destroy (mem_stream);
goto FAIL;
}