summaryrefslogtreecommitdiffstats
path: root/tsutils
diff options
context:
space:
mode:
authorLi Xiaoming <lixm.fnst@cn.fujitsu.com>2019-08-06 14:44:17 +0800
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-08-06 23:55:31 +0000
commitd8258504763972738c53a14dd4bea9a90da8c6fa (patch)
tree2fecfcbb75156753835eb4823ac5b5eaf22845bc /tsutils
parent8310076d9255f0a54d6b9c0064b3e08469970497 (diff)
Fix index undefined warning
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 <lixm.fnst@cn.fujitsu.com>
Diffstat (limited to 'tsutils')
-rw-r--r--tsutils/tsplayer/tsplayer.c3
1 files changed, 2 insertions, 1 deletions
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)
{