Sparse warning: "initializer entry defined twice"

From: Steve French
Date: Thu May 06 2010 - 19:43:16 EST


Sparse, but not gcc, throws a warning ("make modules C=1") as follows
on the first two lines of the following array of booleans

CHECK fs/smb2/misc.c
fs/smb2/misc.c:456:23: warning: Initializer entry defined twice
fs/smb2/misc.c:457:27: also defined here


static const bool has_smb2_data_area[NUMBER_OF_SMB2_COMMANDS] = {
    /* SMB2_NEGOTIATE */ true,
    /* SMB2_SESSION_SETUP */ true,
    /* SMB2_LOGOFF */ false,
    /* SMB2_TREE_CONNECT */    false,
    /* SMB2_TREE_DISCONNECT */ false,
    /* SMB2_CREATE */ true,
    /* SMB2_CLOSE */ false,
    /* SMB2_FLUSH */ false,
    /* SMB2_READ */    true,
    /* SMB2_WRITE */ false,
    /* SMB2_LOCK */    false,
    /* SMB2_IOCTL */ true,
    /* SMB2_CANCEL */ false, /* BB CHECK this not listed in documentation */
    /* SMB2_ECHO */ false,
    /* SMB2_QUERY_DIRECTORY */ true,
    /* SMB2_CHANGE_NOTIFY */ true,
    /* SMB2_QUERY_INFO */ true,
    /* SMB2_SET_INFO */ false,
    /* SMB2_OPLOCK_BREAK */ false
};


Any idea why sparse is complaining about the first two lines of the
arry of booleans? Is this just a sparse bug?

--
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/