Fix warning in test_strunescape
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 14 Oct 2019 16:12:52 +0000 (18:12 +0200)
committerMatthias Runge <mrunge@redhat.com>
Wed, 16 Oct 2019 09:05:55 +0000 (11:05 +0200)
commit0f26279b1a297c2ebf3157fcb6e16c86e30c7270
treee3ec81e2d11c7aa453551e54631878a3357abc7a
parent2ad4f9fcecbd76e6da0cc3ec64024aa1081426ab
Fix warning in test_strunescape

src/utils/common/common_test.c:254:3: warning: ‘strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation]
  254 |   strncpy(buffer, "\\tbackslash end\\", sizeof(buffer));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CCLD     test_common

(cherry picked from commit 5bcc3a10cbae9d94ccb10a62218ab26433bbaa67)
(cherry picked from commit 7109b8a27f2d82fbf8c1ae9d58ab6cffbaec9339)
src/utils/common/common_test.c