]> granicus.if.org Git - sysstat/commit
sar.c: Fix gcc warning about possible variables overlap
authorSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 20 Jul 2018 15:20:36 +0000 (17:20 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 20 Jul 2018 15:20:36 +0000 (17:20 +0200)
commitbe209c0a4e4d93c24e6374e798c3a1abf0685be4
tree1142e51e2bd9f5b9f23a1097bb7669042546be4d
parent056b72c49992dd4552b3027e105e3ef52a81ca3e
sar.c: Fix gcc warning about possible variables overlap

Fix gcc warning:
sar.c: In function ‘write_stats_avg’:
sar.c:372:2: warning: ‘strcpy’ accessing 1 byte at offsets [0, 64] and [0, 128] may overlap 1 byte at offset 0 [-Wrestrict]
  strcpy(timestamp[!curr], timestamp[curr]);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sar.c