summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-08-08 17:18:45 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-08-08 17:18:46 -0400
commitcdb920ab084451c8395dea605d96d2bad277ce61 (patch)
tree5bc69959657f6dd611d2053dacde138c81d23091 /src/modules
parent9b7d71df79622246dc325ee70e0a7d23338eb9b8 (diff)
get rid of shadow variables
Summary: gl: add some EINA_FALLTHROUGH Reviewers: #reviewers, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9525
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api.c6
-rw-r--r--src/modules/evas/image_loaders/png/evas_image_load_png.c12
2 files changed, 12 insertions, 6 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api.c b/src/modules/evas/engines/gl_common/evas_gl_api.c
index 1494a881bc..30a95eee5d 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_api.c
@@ -2831,6 +2831,7 @@ _normal_gles3_api_get(Evas_GL_API *funcs, int minor_version)
2831 ORD(glTexBuffer); 2831 ORD(glTexBuffer);
2832 ORD(glTexBufferRange); 2832 ORD(glTexBufferRange);
2833 ORD(glTexStorage3DMultisample); 2833 ORD(glTexStorage3DMultisample);
2834 EINA_FALLTHROUGH;
2834 case 1: 2835 case 1:
2835 ORD(glDispatchCompute); 2836 ORD(glDispatchCompute);
2836 ORD(glDispatchComputeIndirect); 2837 ORD(glDispatchComputeIndirect);
@@ -2900,6 +2901,7 @@ _normal_gles3_api_get(Evas_GL_API *funcs, int minor_version)
2900 ORD(glVertexAttribIFormat); 2901 ORD(glVertexAttribIFormat);
2901 ORD(glVertexAttribBinding); 2902 ORD(glVertexAttribBinding);
2902 ORD(glVertexBindingDivisor); 2903 ORD(glVertexBindingDivisor);
2904 EINA_FALLTHROUGH;
2903 case 0: 2905 case 0:
2904 ORD(glBeginQuery); 2906 ORD(glBeginQuery);
2905 ORD(glBeginTransformFeedback); 2907 ORD(glBeginTransformFeedback);
@@ -3209,6 +3211,7 @@ _debug_gles3_api_get(Evas_GL_API *funcs, int minor_version)
3209 ORD(glTexBuffer); 3211 ORD(glTexBuffer);
3210 ORD(glTexBufferRange); 3212 ORD(glTexBufferRange);
3211 ORD(glTexStorage3DMultisample); 3213 ORD(glTexStorage3DMultisample);
3214 EINA_FALLTHROUGH;
3212 case 1: 3215 case 1:
3213 ORD(glDispatchCompute); 3216 ORD(glDispatchCompute);
3214 ORD(glDispatchComputeIndirect); 3217 ORD(glDispatchComputeIndirect);
@@ -3278,6 +3281,7 @@ _debug_gles3_api_get(Evas_GL_API *funcs, int minor_version)
3278 ORD(glVertexAttribIFormat); 3281 ORD(glVertexAttribIFormat);
3279 ORD(glVertexAttribBinding); 3282 ORD(glVertexAttribBinding);
3280 ORD(glVertexBindingDivisor); 3283 ORD(glVertexBindingDivisor);
3284 EINA_FALLTHROUGH;
3281 case 0: 3285 case 0:
3282 ORD(glBeginQuery); 3286 ORD(glBeginQuery);
3283 ORD(glBeginTransformFeedback); 3287 ORD(glBeginTransformFeedback);
@@ -3455,6 +3459,7 @@ _evgl_load_gles3_apis(void *dl_handle, Evas_GL_API *funcs, int minor_version,
3455 ORD(glTexBuffer); 3459 ORD(glTexBuffer);
3456 ORD(glTexBufferRange); 3460 ORD(glTexBufferRange);
3457 ORD(glTexStorage3DMultisample); 3461 ORD(glTexStorage3DMultisample);
3462 EINA_FALLTHROUGH;
3458 case 1: 3463 case 1:
3459 ORD(glDispatchCompute); 3464 ORD(glDispatchCompute);
3460 ORD(glDispatchComputeIndirect); 3465 ORD(glDispatchComputeIndirect);
@@ -3524,6 +3529,7 @@ _evgl_load_gles3_apis(void *dl_handle, Evas_GL_API *funcs, int minor_version,
3524 ORD(glVertexAttribIFormat); 3529 ORD(glVertexAttribIFormat);
3525 ORD(glVertexAttribBinding); 3530 ORD(glVertexAttribBinding);
3526 ORD(glVertexBindingDivisor); 3531 ORD(glVertexBindingDivisor);
3532 EINA_FALLTHROUGH;
3527 case 0: 3533 case 0:
3528 ORD(glBeginQuery); 3534 ORD(glBeginQuery);
3529 ORD(glBeginTransformFeedback); 3535 ORD(glBeginTransformFeedback);
diff --git a/src/modules/evas/image_loaders/png/evas_image_load_png.c b/src/modules/evas/image_loaders/png/evas_image_load_png.c
index 4ffd5643c6..732bd94c6a 100644
--- a/src/modules/evas/image_loaders/png/evas_image_load_png.c
+++ b/src/modules/evas/image_loaders/png/evas_image_load_png.c
@@ -804,15 +804,15 @@ evas_image_load_file_data_png(void *loader_data,
804 //general case: 4 bytes pixel. 804 //general case: 4 bytes pixel.
805 if (pack_offset == sizeof(DATA32)) 805 if (pack_offset == sizeof(DATA32))
806 { 806 {
807 DATA32 *dst_ptr = (DATA32 *) surface; 807 DATA32 *dst_ptr2 = (DATA32 *) surface;
808 DATA32 *src_ptr2 = (DATA32 *) src_ptr; 808 DATA32 *src_ptr2 = (DATA32 *) src_ptr;
809 809
810 for (i = 0; i < h; i++) 810 for (i = 0; i < h; i++)
811 { 811 {
812 for (j = 0; j < w; j++) 812 for (j = 0; j < w; j++)
813 { 813 {
814 *dst_ptr = *src_ptr2; 814 *dst_ptr2 = *src_ptr2;
815 ++dst_ptr; 815 ++dst_ptr2;
816 src_ptr2 += scale_ratio; 816 src_ptr2 += scale_ratio;
817 } 817 }
818 src_ptr2 += scale_ratio * image_w; 818 src_ptr2 += scale_ratio * image_w;
@@ -820,15 +820,15 @@ evas_image_load_file_data_png(void *loader_data,
820 } 820 }
821 else 821 else
822 { 822 {
823 unsigned char *dst_ptr = surface; 823 unsigned char *dst_ptr2 = surface;
824 824
825 for (i = 0; i < h; i++) 825 for (i = 0; i < h; i++)
826 { 826 {
827 for (j = 0; j < w; j++) 827 for (j = 0; j < w; j++)
828 { 828 {
829 for (k = 0; k < (int)pack_offset; k++) 829 for (k = 0; k < (int)pack_offset; k++)
830 dst_ptr[k] = src_ptr[k + scale_ratio * j * pack_offset]; 830 dst_ptr2[k] = src_ptr[k + scale_ratio * j * pack_offset];
831 dst_ptr += pack_offset; 831 dst_ptr2 += pack_offset;
832 } 832 }
833 src_ptr += scale_ratio * image_w * pack_offset; 833 src_ptr += scale_ratio * image_w * pack_offset;
834 } 834 }