From d8258504763972738c53a14dd4bea9a90da8c6fa Mon Sep 17 00:00:00 2001 From: Li Xiaoming Date: Tue, 6 Aug 2019 14:44:17 +0800 Subject: Fix index undefined warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch will remove warning: "warning: operation on ‘index’ may be undefined [-Wsequence-point]" Bug-AGL: SPEC-2422 Change-Id: I7c3f630861da31af17ce1a0a415c79fc0acd6637 Signed-off-by: Li Xiaoming --- tsutils/tsplayer/tsplayer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tsutils/tsplayer') diff --git a/tsutils/tsplayer/tsplayer.c b/tsutils/tsplayer/tsplayer.c index f0ab6f7..acb968b 100644 --- a/tsutils/tsplayer/tsplayer.c +++ b/tsutils/tsplayer/tsplayer.c @@ -280,7 +280,8 @@ int main(int argc,char *argv[]) { if (strcmp(argv[index], "-f") == 0) { - memcpy(eventFileName, argv[++index], strlen(argv[index])); + memcpy(eventFileName, argv[index + 1], strlen(argv[index])); + index++; } else if (strcmp(argv[index], "-d") == 0) { -- cgit 1.2.3-korg