]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Fix p0 initializer
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 5 Oct 2016 00:26:36 +0000 (17:26 -0700)
committerGitHub <noreply@github.com>
Wed, 5 Oct 2016 00:26:36 +0000 (17:26 -0700)
Due to changes in the task_struct the following warning is occurs
when initializing the global p0.  Since this structure only exists
for it's address to be taken initialize it in a manor which isn't
sensitive to internal changes to the structure.

  module/spl/spl-generic.c:58:1: error: missing braces around
  initializer [-Werror=missing-braces]

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #576

module/spl/spl-generic.c

index 88a0fcc512ad4ba11b03084d154ae5c307e3232d..c04cb538c45a2c5dd25067306406143958549064 100644 (file)
@@ -55,7 +55,7 @@ EXPORT_SYMBOL(spl_hostid);
 module_param(spl_hostid, ulong, 0644);
 MODULE_PARM_DESC(spl_hostid, "The system hostid.");
 
-proc_t p0 = { 0 };
+proc_t p0;
 EXPORT_SYMBOL(p0);
 
 /*
@@ -660,6 +660,7 @@ spl_init(void)
 {
        int rc = 0;
 
+       bzero(&p0, sizeof (proc_t));
        spl_random_init();
 
        if ((rc = spl_kvmem_init()))