Whamcloud - gitweb
lib/blkid: suppress -Wstringop-truncation warning in blkid_strndup()
authorEric Biggers <ebiggers@google.com>
Sat, 21 Jan 2023 20:32:03 +0000 (12:32 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 27 Jan 2023 17:33:59 +0000 (12:33 -0500)
commitc093c7527d4c2baedef32d6eb31175e48af3b99d
tree68f8ea32ddcc32c33ddf17c63ecc7e63281d5e6b
parentb575249eb334e3f95319eea68c9606f43db05a07
lib/blkid: suppress -Wstringop-truncation warning in blkid_strndup()

Unfortunately, gcc gets confused by blkid_strndup() and incorrectly
thinks the destination string is not being null-terminated.  This is
part of -Wstringop-truncation, enabled automatically by -Wall in gcc 8
and later.  Let's just suppress this warning here.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/blkid/devno.c