Permalink
Browse files

GCC 9.0: Fix ztest "directive argument is not a nul-terminated string"

GCC 9.0 is complaining because we're trying to print strings that
are defined like this:

.zo_pool = { 'z', 't', 'e', 's', 't', '\0' },

Fix them by making them actual strings.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #8330
Requires-spl: refs/pull/713/head
  • Loading branch information...
tonyhutter committed Jan 23, 2019
1 parent b36c679 commit 87e7f79ef41df0f666192272ebb7132cfed7a6ec
Showing with 2 additions and 2 deletions.
  1. +2 −2 cmd/ztest/ztest.c
@@ -171,8 +171,8 @@ typedef struct ztest_shared_opts {
} ztest_shared_opts_t;

static const ztest_shared_opts_t ztest_opts_defaults = {
.zo_pool = { 'z', 't', 'e', 's', 't', '\0' },
.zo_dir = { '/', 't', 'm', 'p', '\0' },
.zo_pool = "ztest",
.zo_dir = "/tmp",
.zo_alt_ztest = { '\0' },
.zo_alt_libpath = { '\0' },
.zo_vdevs = 5,

0 comments on commit 87e7f79

Please sign in to comment.