diff options
author | Li Xiaoming <lixm.fnst@cn.fujitsu.com> | 2019-08-06 14:44:17 +0800 |
---|---|---|
committer | Li Xiaoming <lixm.fnst@cn.fujitsu.com> | 2019-08-06 14:44:17 +0800 |
commit | 94122a8f011fc629662931072aeb411f38f96e4a (patch) | |
tree | 2fecfcbb75156753835eb4823ac5b5eaf22845bc /tsutils | |
parent | 8310076d9255f0a54d6b9c0064b3e08469970497 (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.c | 3 |
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)
{
|