diff --git a/legacy/evas/src/bin/evas_cserve_main.c b/legacy/evas/src/bin/evas_cserve_main.c index 7d4d95ac23..92718dae48 100644 --- a/legacy/evas/src/bin/evas_cserve_main.c +++ b/legacy/evas/src/bin/evas_cserve_main.c @@ -642,10 +642,9 @@ mem_cache_adjust(void) { int pval = cache_max_adjust; int max = 0; - int mem_used; if (mem_total <= 0) return; - mem_used = mem_total - mem_free - mem_cached - mem_buffers; + //int mem_used = mem_total - mem_free - mem_cached - mem_buffers; #if 0 // this lets the image cache to grow to fill all real free ram, if // there is any (ie ram unused by disk cache) if (mem_free < mem_total) diff --git a/legacy/evas/src/lib/canvas/evas_map.c b/legacy/evas/src/lib/canvas/evas_map.c index 2359d5aebd..5fe61aa1f8 100644 --- a/legacy/evas/src/lib/canvas/evas_map.c +++ b/legacy/evas/src/lib/canvas/evas_map.c @@ -35,7 +35,7 @@ _evas_map_calc_geom_change(Evas_Object *obj) static void _evas_map_calc_map_geometry(Evas_Object *obj) { - Evas_Coord x1, x2, y1, y2; + Evas_Coord x1, x2, yy1, yy2; const Evas_Map_Point *p, *p_end; Eina_Bool ch = EINA_FALSE; @@ -82,7 +82,7 @@ _evas_map_calc_map_geometry(Evas_Object *obj) p = obj->cur.map->points; p_end = p + obj->cur.map->count; x1 = x2 = lround(p->x); - y1 = y2 = lround(p->y); + yy1 = yy2 = lround(p->y); p++; for (; p < p_end; p++) { @@ -92,21 +92,21 @@ _evas_map_calc_map_geometry(Evas_Object *obj) y = lround(p->y); if (x < x1) x1 = x; if (x > x2) x2 = x; - if (y < y1) y1 = y; - if (y > y2) y2 = y; + if (y < yy1) yy1 = y; + if (y > yy2) yy2 = y; } // this causes clip-out bugs now mapped objs canbe opaque!!! // // add 1 pixel of fuzz around the map region to ensure updates are correct -// x1 -= 1; y1 -= 1; -// x2 += 1; y2 += 1; +// x1 -= 1; yy1 -= 1; +// x2 += 1; yy2 += 1; if (obj->cur.map->normal_geometry.x != x1) ch = 1; - if (obj->cur.map->normal_geometry.y != y1) ch = 1; + if (obj->cur.map->normal_geometry.y != yy1) ch = 1; if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1; - if (obj->cur.map->normal_geometry.h != (y2 - y1)) ch = 1; + if (obj->cur.map->normal_geometry.h != (yy2 - yy1)) ch = 1; obj->cur.map->normal_geometry.x = x1; - obj->cur.map->normal_geometry.y = y1; + obj->cur.map->normal_geometry.y = yy1; obj->cur.map->normal_geometry.w = (x2 - x1); - obj->cur.map->normal_geometry.h = (y2 - y1); + obj->cur.map->normal_geometry.h = (yy2 - yy1); if (ch) _evas_map_calc_geom_change(obj); } @@ -896,7 +896,7 @@ evas_map_util_3d_lighting(Evas_Map *m, for (i = 0; i < m->count; i++) { double x, y, z; - double nx, ny, nz, x1, y1, z1, x2, y2, z2, ln, br; + double nx, ny, nz, x1, yy1, z1, x2, yy2, z2, ln, br; int h, j, mr, mg, mb; x = m->points[i].x; @@ -907,15 +907,15 @@ evas_map_util_3d_lighting(Evas_Map *m, j = (i + 1) % 4 + (i & ~0x3); // next point x1 = m->points[h].x - x; - y1 = m->points[h].y - y; + yy1 = m->points[h].y - y; z1 = m->points[h].z - z; x2 = m->points[j].x - x; - y2 = m->points[j].y - y; + yy2 = m->points[j].y - y; z2 = m->points[j].z - z; - nx = (y1 * z2) - (z1 * y2); + nx = (yy1 * z2) - (z1 * yy2); ny = (z1 * x2) - (x1 * z2); - nz = (x1 * y2) - (y1 * x2); + nz = (x1 * yy2) - (yy1 * x2); ln = (nx * nx) + (ny * ny) + (nz * nz); ln = sqrt(ln); diff --git a/legacy/evas/src/lib/canvas/evas_object_main.c b/legacy/evas/src/lib/canvas/evas_object_main.c index 86ab49837d..9543228060 100644 --- a/legacy/evas/src/lib/canvas/evas_object_main.c +++ b/legacy/evas/src/lib/canvas/evas_object_main.c @@ -230,7 +230,7 @@ evas_object_clip_changes_clean(Evas_Object *obj) } void -evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v) +evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v __UNUSED__) { Eina_Rectangle *r; Evas_Object *clipper; @@ -241,7 +241,6 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int i if (obj->smart.smart) goto end; /* FIXME: was_v isn't used... why? */ - was_v = 0; if (!obj->clip.clipees) { EINA_ARRAY_ITER_NEXT(rects, i, r, it) diff --git a/legacy/evas/src/lib/engines/common/evas_polygon_main.c b/legacy/evas/src/lib/engines/common/evas_polygon_main.c index ea0bf1315d..6840d60f66 100644 --- a/legacy/evas/src/lib/engines/common/evas_polygon_main.c +++ b/legacy/evas/src/lib/engines/common/evas_polygon_main.c @@ -133,7 +133,7 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po int num_active_edges; int n; int i, j, k; - int y0, y1, yi; + int yy0, yy1, yi; int ext_x, ext_y, ext_w, ext_h; int *sorted_index; @@ -211,14 +211,14 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po k++; } - y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); - y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); + yy0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); + yy1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); k = 0; num_active_edges = 0; spans = NULL; - for (yi = y0; yi <= y1; yi++) + for (yi = yy0; yi <= yy1; yi++) { for (; (k < n) && (point[sorted_index[k]].y <= ((double)yi + 0.5)); k++) { diff --git a/legacy/evas/src/lib/engines/common/evas_scale_sample.c b/legacy/evas/src/lib/engines/common/evas_scale_sample.c index a8951b8353..c721c5e740 100644 --- a/legacy/evas/src/lib/engines/common/evas_scale_sample.c +++ b/legacy/evas/src/lib/engines/common/evas_scale_sample.c @@ -90,7 +90,6 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, DATA32 *buf, *dptr; DATA32 **row_ptr; DATA32 *ptr, *dst_ptr, *src_data, *dst_data; - int dst_jump; int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h; int m_clip_x = 0, m_clip_y = 0, m_clip_w = 0, m_clip_h = 0, mdx = 0, mdy = 0; int src_w, src_h, dst_w, dst_h; @@ -248,7 +247,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, row_ptr = alloca(dst_clip_h * sizeof(DATA32 *)); /* figure out dst jump */ - dst_jump = dst_w - dst_clip_w; + //dst_jump = dst_w - dst_clip_w; /* figure out dest start ptr */ dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w); diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c index 50b2e5c20f..a443c85b89 100644 --- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c +++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c @@ -3,7 +3,7 @@ DATA32 *pix, *dptr, *pbuf, **yp; int r, g, b, a, rr, gg, bb, aa; int *xp, xap, yap, pos; - int dyy, dxx; + //int dyy, dxx; int w = dst_clip_w; #ifdef EVAS_SLI int ysli = dst_clip_y; @@ -11,8 +11,8 @@ dptr = dst_ptr; pos = (src_region_y * src_w) + src_region_x; - dyy = dst_clip_y - dst_region_y; - dxx = dst_clip_x - dst_region_x; + //dyy = dst_clip_y - dst_region_y; + //dxx = dst_clip_x - dst_region_x; xp = xpoints;// + dxx; yp = ypoints;// + dyy; diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c index ab0c74ecaa..73da3a0eab 100644 --- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c +++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c @@ -3,7 +3,7 @@ DATA32 *dptr, *sptr, *pix, *pbuf; int a, r, g, b, rx, gx, bx, ax; int xap, yap, pos; - int dyy, dxx; + //int dyy, dxx; #ifdef EVAS_SLI int ysli = dst_clip_y; #endif @@ -14,8 +14,8 @@ dptr = dst_ptr; pos = (src_region_y * src_w) + src_region_x; - dyy = dst_clip_y - dst_region_y; - dxx = dst_clip_x - dst_region_x; + //dyy = dst_clip_y - dst_region_y; + //dxx = dst_clip_x - dst_region_x; xp = xpoints;// + dxx; yp = ypoints;// + dyy; diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c index 4c5448e271..3b7585d22f 100644 --- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c +++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c @@ -3,7 +3,7 @@ DATA32 *dptr, *pix, *pbuf, **yp; int r, g, b, a, rr, gg, bb, aa; int *xp, xap, yap, pos; - int dyy, dxx; + //int dyy, dxx; int w = dst_clip_w; #ifdef EVAS_SLI int ysli = dst_clip_y; @@ -11,8 +11,8 @@ dptr = dst_ptr; pos = (src_region_y * src_w) + src_region_x; - dyy = dst_clip_y - dst_region_y; - dxx = dst_clip_x - dst_region_x; + //dyy = dst_clip_y - dst_region_y; + //dxx = dst_clip_x - dst_region_x; xp = xpoints;// + dxx; yp = ypoints;// + dyy; diff --git a/legacy/evas/src/modules/engines/buffer/evas_engine.c b/legacy/evas/src/modules/engines/buffer/evas_engine.c index 355ef7e894..f919c58da1 100644 --- a/legacy/evas/src/modules/engines/buffer/evas_engine.c +++ b/legacy/evas/src/modules/engines/buffer/evas_engine.c @@ -358,20 +358,14 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int } static void -eng_output_flush(void *data) +eng_output_flush(void *data __UNUSED__) { - Render_Engine *re; - - re = (Render_Engine *)data; evas_buffer_outbuf_buf_switch_buffer(re->ob); } static void -eng_output_idle_flush(void *data) +eng_output_idle_flush(void *data __UNUSED__) { - Render_Engine *re; - - re = (Render_Engine *)data; } static Eina_Bool diff --git a/legacy/evas/src/modules/engines/buffer/evas_outbuf.c b/legacy/evas/src/modules/engines/buffer/evas_outbuf.c index db42f23481..0fa1842fe1 100644 --- a/legacy/evas/src/modules/engines/buffer/evas_outbuf.c +++ b/legacy/evas/src/modules/engines/buffer/evas_outbuf.c @@ -25,7 +25,6 @@ evas_buffer_outbuf_buf_setup_fb(int w, int h, Outbuf_Depth depth, void *dest, in ) { Outbuf *buf; - int bpp; buf = calloc(1, sizeof(Outbuf)); if (!buf) return NULL; @@ -47,11 +46,6 @@ evas_buffer_outbuf_buf_setup_fb(int w, int h, Outbuf_Depth depth, void *dest, in buf->func.switch_buffer = switch_buffer; buf->switch_data = switch_data; - bpp = sizeof(DATA32); - if ((buf->depth == OUTBUF_DEPTH_RGB_24BPP_888_888) || - (buf->depth == OUTBUF_DEPTH_BGR_24BPP_888_888)) - bpp = 3; - if ((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888) && (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32)))) { diff --git a/legacy/evas/src/modules/engines/fb/evas_engine.c b/legacy/evas/src/modules/engines/fb/evas_engine.c index 7681b00d67..e15c02b811 100644 --- a/legacy/evas/src/modules/engines/fb/evas_engine.c +++ b/legacy/evas/src/modules/engines/fb/evas_engine.c @@ -74,7 +74,7 @@ _output_setup(int w, int h, int rot, int vt, int dev, int refresh) /* engine api this module provides */ static void * -eng_info(Evas *e) +eng_info(Evas *e __UNUSED__) { Evas_Engine_Info_FB *info; info = calloc(1, sizeof(Evas_Engine_Info_FB)); @@ -82,7 +82,6 @@ eng_info(Evas *e) info->magic.magic = rand(); info->render_mode = EVAS_RENDER_MODE_BLOCKING; return info; - e = NULL; } static void @@ -231,19 +230,13 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int } static void -eng_output_flush(void *data) +eng_output_flush(void *data __UNUSED__) { - Render_Engine *re; - - re = (Render_Engine *)data; } static void -eng_output_idle_flush(void *data) +eng_output_idle_flush(void *data __UNUSED__) { - Render_Engine *re; - - re = (Render_Engine *)data; } static Eina_Bool diff --git a/legacy/evas/src/modules/engines/fb/evas_outbuf.c b/legacy/evas/src/modules/engines/fb/evas_outbuf.c index 57cf7a6850..7ae24c5e1e 100644 --- a/legacy/evas/src/modules/engines/fb/evas_outbuf.c +++ b/legacy/evas/src/modules/engines/fb/evas_outbuf.c @@ -25,7 +25,7 @@ evas_fb_outbuf_fb_setup_fb(int w, int h, int rot, Outbuf_Depth depth, int vt_no, /* setup window and/or fb */ /* if (dithered) create backbuf */ Outbuf *buf; - int fb_fd = -1; + int fb_fd; int fb_depth; fb_depth = -1; @@ -51,6 +51,11 @@ evas_fb_outbuf_fb_setup_fb(int w, int h, int rot, Outbuf_Depth depth, int vt_no, return NULL; } fb_fd = fb_postinit(buf->priv.fb.fb); + if (fb_fd < 1) + { + free(buf); + return NULL; + } if (rot == 0 || rot == 180) { diff --git a/legacy/evas/src/modules/engines/software_generic/evas_engine.c b/legacy/evas/src/modules/engines/software_generic/evas_engine.c index 48944dd8a4..b7b98886fe 100644 --- a/legacy/evas/src/modules/engines/software_generic/evas_engine.c +++ b/legacy/evas/src/modules/engines/software_generic/evas_engine.c @@ -591,11 +591,8 @@ eng_image_border_set(void *data __UNUSED__, void *image, int l __UNUSED__, int r } static void -eng_image_border_get(void *data __UNUSED__, void *image, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) +eng_image_border_get(void *data __UNUSED__, void *image __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) { - RGBA_Image *im; - - im = image; } static char * @@ -704,18 +701,16 @@ eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) static void * eng_image_size_set(void *data __UNUSED__, void *image, int w, int h) { - Image_Entry *im; - - im = image; - return evas_cache_image_size_set(image, w, h); + Image_Entry *im = image; + if (!im) return NULL; + return evas_cache_image_size_set(im, w, h); } static void * eng_image_dirty_region(void *data __UNUSED__, void *image, int x, int y, int w, int h) { Image_Entry *im = image; - - if (!image) return NULL; + if (!im) return NULL; return evas_cache_image_dirty(im, x, y, w, h); } @@ -931,11 +926,10 @@ static void * eng_image_map_surface_new(void *data __UNUSED__, int w, int h, int alpha) { void *surface; - DATA32 *pixels; surface = evas_cache_image_copied_data(evas_common_image_cache_get(), w, h, NULL, alpha, EVAS_COLORSPACE_ARGB8888); - pixels = evas_cache_image_pixels(surface); + evas_cache_image_pixels(surface); return surface; } @@ -2519,7 +2513,7 @@ evgl_glShaderSource(GLuint shader, GLsizei count, const char** string, const GLi static void -evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +evgl_glGetShaderPrecisionFormat(GLenum shadertype __UNUSED__, GLenum precisiontype __UNUSED__, GLint* range, GLint* precision) { if (range) { @@ -2531,7 +2525,6 @@ evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* precision[0] = 24; // floor(-log2((1.0/16777218.0))); } return; - shadertype = precisiontype = 0; } static void