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 06:50:49 +0000 (08:50 +0200)
commit7109b8a27f2d82fbf8c1ae9d58ab6cffbaec9339
tree45a48b084513754ecabd03513d639a2b02dbf7a0
parent52e8daca0c0b53c61c31fe9ea058b08e6eb7c2b1
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)
src/utils/common/common_test.c