]> git.proxmox.com Git - mirror_zfs.git/commitdiff
GCC 9.0: Fix ztest "directive argument is not a nul-terminated string"
authorTony Hutter <hutter2@llnl.gov>
Wed, 23 Jan 2019 19:17:52 +0000 (11:17 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 28 Jan 2019 18:11:45 +0000 (10:11 -0800)
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

cmd/ztest/ztest.c

index e080f7bb44191754808098cd67c13b2c89a97c16..adbf60c60ef17a8934b7d8085f7234b134c0f584 100644 (file)
@@ -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,