Skip to content

Commit

Permalink
GCC 9.0: Fix ztest "directive argument is not a nul-terminated string"
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Fixes: openzfs#8330
  • Loading branch information
tonyhutter committed Jan 24, 2019
1 parent 810c9db commit 11249ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/ztest/ztest.c
Expand Up @@ -183,8 +183,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,
Expand Down

0 comments on commit 11249ff

Please sign in to comment.