summaryrefslogtreecommitdiffstats
path: root/tsutils
diff options
context:
space:
mode:
authorLi Xiaoming <lixm.fnst@cn.fujitsu.com>2019-08-06 14:44:17 +0800
committerLi Xiaoming <lixm.fnst@cn.fujitsu.com>2019-08-06 14:44:17 +0800
commit94122a8f011fc629662931072aeb411f38f96e4a (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)
{