]> git.ipfire.org Git - thirdparty/samba.git/commit
tdb: fix compilation with TDB_TRACE=1
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 10 Jul 2024 02:35:28 +0000 (14:35 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Sat, 27 Jul 2024 22:47:39 +0000 (22:47 +0000)
commite653b0870fd5d5684d90497565efc8463a72192a
treeeca0a81435efcda9480a78f03fc89ae19465b0dc
parente61f53b656f074a80ae66dfda776b56b03cc9918
tdb: fix compilation with TDB_TRACE=1

../../lib/tdb/common/tdb.c: In function ‘tdb_trace_record’:
../../lib/tdb/common/tdb.c:1224:22: error: ‘snprintf’ output truncated before the last format character [-Werror=format-truncation=]
 1224 |                 p += snprintf(p, 2, %02x, rec.dptr[i]);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../lib/tdb/common/tdb.c:1224:22: note: ‘snprintf’ output 3 bytes into a destination of size 2
cc1: all warnings being treated as errors

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/tdb/common/tdb.c