fix build warning 60/62460/1 accepted/tizen/common/20160406.143944 accepted/tizen/ivi/20160406.070956 accepted/tizen/mobile/20160406.070830 accepted/tizen/tv/20160406.070856 accepted/tizen/wearable/20160406.070924 submit/tizen/20160324.041503 submit/tizen/20160406.010154
authorhk57.kim <hk57.kim@samsung.com>
Wed, 16 Mar 2016 07:42:19 +0000 (16:42 +0900)
committerhk57.kim <hk57.kim@samsung.com>
Wed, 16 Mar 2016 07:42:19 +0000 (16:42 +0900)
Change-Id: Iff4a3ad9811ba4454be3e29d8876a5f3974f4c7f
Signed-off-by: hk57.kim <hk57.kim@samsung.com>
15 files changed:
src/cairo-array.c
src/cairo-botor-scan-converter.c
src/cairo-gl-device.c
src/cairo-gl-gradient.c
src/cairo-gl-info.c
src/cairo-gl-msaa-compositor.c
src/cairo-gl-private.h
src/cairo-gl-surface.c
src/cairo-path-stroke.c
src/cairo-pattern.c
src/cairo-polygon-intersect.c
src/cairo-polygon-reduce.c
src/cairo-ps-surface.c
src/cairo-script-surface.c
src/cairo-type3-glyph-surface.c

index e37bb99..7cc2bf0 100644 (file)
@@ -240,7 +240,7 @@ _cairo_array_copy_element (const cairo_array_t *array,
                           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);
 }
index 515305b..880fe8c 100644 (file)
@@ -194,6 +194,8 @@ floored_divrem (int a, int b)
     return qr;
 }
 
+/*
+ # to avoid warning : defined but not used [-Wunused-function]
 static struct quorem
 floored_muldivrem(int x, int a, int b)
 {
@@ -207,6 +209,7 @@ 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,
@@ -2045,6 +2048,8 @@ _cairo_botor_scan_converter_generate (void                        *converter,
     return status;
 }
 
+/*
+# to avoid warning : defined but not used [-Wunused-function]
 static edge_t *
 botor_allocate_edge (cairo_botor_scan_converter_t *self)
 {
@@ -2127,6 +2132,7 @@ botor_add_edge (cairo_botor_scan_converter_t *self,
 
     return CAIRO_STATUS_SUCCESS;
 }
+*/
 
 static void
 _cairo_botor_scan_converter_destroy (void *converter)
index 5dce9fb..3258388 100644 (file)
@@ -507,7 +507,7 @@ _cairo_gl_context_activate (cairo_gl_context_t *ctx,
             _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;
         }
@@ -850,8 +850,8 @@ bind_multisample_framebuffer (cairo_gl_context_t *ctx,
                               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) {
@@ -1115,7 +1115,8 @@ cairo_gl_device_set_thread_aware (cairo_device_t  *device,
     }
     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;
     }
 }
index 325612b..53801ff 100644 (file)
@@ -83,6 +83,8 @@ _cairo_gl_gradient_sample_width (unsigned int                 n_stops,
     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;
@@ -103,6 +105,7 @@ static uint32_t color_stop_to_pixel(const cairo_gradient_stop_t *stop)
     else
        return a << 0 | r << 8 | g << 16 | b << 24;
 }
+*/
 
 static cairo_status_t
 _cairo_gl_gradient_render (const cairo_gl_context_t    *ctx,
index fffea58..5da1eac 100644 (file)
@@ -124,11 +124,11 @@ _cairo_gl_has_extension (cairo_gl_dispatch_t *dispatch, const char *ext)
 {
     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;
index 99d8cc0..49717f0 100644 (file)
@@ -833,6 +833,8 @@ _stroke_shaper_add_quad (void                       *closure,
                                                      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)
@@ -840,6 +842,7 @@ _is_continuous_arc (const cairo_path_fixed_t   *path,
     return (_cairo_path_fixed_is_single_arc (path) &&
            style->dash == NULL);
 }
+*/
 
 static cairo_int_status_t
 _prevent_overlapping_strokes (cairo_gl_context_t               *ctx,
index 2c534fc..c013b8d 100644 (file)
@@ -857,7 +857,7 @@ _cairo_gl_ensure_drawbuffers (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;
 
@@ -872,7 +872,7 @@ _cairo_gl_ensure_drawbuffers (cairo_gl_context_t *ctx)
     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;
@@ -881,7 +881,7 @@ _cairo_gl_ensure_drawbuffers (cairo_gl_context_t *ctx)
     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;
index e156a0a..7938f30 100644 (file)
@@ -1441,11 +1441,14 @@ FAIL:
     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)
index 5c260c9..c3f022b 100644 (file)
@@ -90,6 +90,8 @@ typedef struct cairo_stroker {
     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,
@@ -117,7 +119,7 @@ _cairo_stroke_segment_intersect (cairo_point_t *p1, cairo_point_t *p2,
     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;
@@ -129,6 +131,7 @@ _cairo_stroke_segment_intersect (cairo_point_t *p1, cairo_point_t *p2,
     p->y = _cairo_fixed_from_double (y);
     return TRUE;
 }
+*/
 
 static void
 _cairo_stroker_limit (cairo_stroker_t *stroker,
index c7d269c..a07c22f 100644 (file)
@@ -297,7 +297,7 @@ _cairo_mesh_pattern_init_copy (cairo_mesh_pattern_t       *pattern,
     *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,
index 2cd73d2..fc8b249 100644 (file)
@@ -444,7 +444,7 @@ edges_compare_x_for_y (const cairo_bo_edge_t *a,
        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;
index ea457fe..da6c9ab 100644 (file)
@@ -445,7 +445,7 @@ edges_compare_x_for_y (const cairo_bo_edge_t *a,
        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;
index 4fc15f6..b59ccaa 100644 (file)
@@ -1907,7 +1907,7 @@ _cairo_ps_surface_create_padded_image_from_image (cairo_ps_surface_t           *
        if (pad_image->status) {
            status = pad_image->status;
            cairo_surface_destroy (pad_image);
-           status;
+           //status;
        }
 
        _cairo_pattern_init_for_surface (&pad_pattern, &source->base);
index 68c1528..fdea7bb 100644 (file)
@@ -3778,7 +3778,8 @@ cairo_script_create (const char *filename)
 
     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);
     }
 
@@ -3812,7 +3813,8 @@ cairo_script_create_for_stream (cairo_write_func_t         write_func,
 
     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);
     }
 
index 63d2bd7..e7f31de 100644 (file)
@@ -431,7 +431,8 @@ _cairo_type3_glyph_surface_analyze_glyph (void                   *abstract_surface,
     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;
     }
 
@@ -538,7 +539,8 @@ _cairo_type3_glyph_surface_emit_glyph (void              *abstract_surface,
        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;
        }