From 4a872fa90d6e1bb693f746314056fcfa8ec9b600 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=utf8 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 Change-Id: I3c107dac3bbdf7863d42cf1abc2826bc02d1ed34 --- 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 262127a..c2cfdf3 100644 --- a/src/lib/evas/vg/evas_vg_cache.c +++ b/src/lib/evas/vg/evas_vg_cache.c @@ -191,8 +191,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) -- 2.7.4