From 100a5b210d87c339d4f51e6efd4d6af1bb30cdbe Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Thu, 21 Feb 2019 14:17:18 +0900 Subject: [PATCH] evas vg: fix correct increment for tflags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: There is warning. ``` lib/evas/vg/evas_vg_cache.c: In function ‘_vg_file_save’: lib/evas/vg/evas_vg_cache.c:185:30: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith] tflags = alloca(len) + 1; ``` Previous code of a8d5f275c78 is intended to increase flags length. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7972 --- src/lib/evas/vg/evas_vg_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/vg/evas_vg_cache.c b/src/lib/evas/vg/evas_vg_cache.c index 9833ef65ae..bd5a4a4f14 100644 --- a/src/lib/evas/vg/evas_vg_cache.c +++ b/src/lib/evas/vg/evas_vg_cache.c @@ -181,8 +181,8 @@ _vg_file_save(Vg_File_Data *vfd, const char *file, const char *key, const char * char *p, *pp; char *tflags; - int len = strlen(flags); - tflags = alloca(len) + 1; + int len = strlen(flags) + 1; + tflags = alloca(len); strncpy(tflags, flags, len); p = tflags; while (p)