The two string arguments to torture_comment() can be NULL
as the succeeding checks suggest. This is not wanted because a compile
with --enable-developer throws an error of [-Werror=format-overflow=]
in those situations.
Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
for (j = 0; j < ARRAY_SIZE(formats); j++) {
torture_comment(tctx, "Converting %s (format %d)"
" to %d gave %s\n",
- n_from[i], formats[i],
- formats[j], n_matrix[i][j]);
+ n_from[i] == NULL ? "NULL" : n_from[i],
+ formats[i], formats[j],
+ n_matrix[i][j] == NULL ?
+ "NULL" : n_matrix[i][j]);
+
if (n_matrix[i][j] == n_from[j]) {
/* We don't have a from name for these yet (and we can't map to them to find it out) */