cannot size expression - exported array in kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here's some code from net/wireless/util.c, expressed as a test case. I
have no idea how to fix it. The actual output is:

+sizeof-external.c:11:16: error: cannot size expression

while none is expected.

johannes

/***** begin file validation/sizeof-external.c **** */
/* #include file that declares it */
extern const unsigned char bridge_tunnel_header[6];

/* define it */
const unsigned char bridge_tunnel_header[] = { 1, 2, 3, 4, 5, 6 };
/* EXPORT_SYMBOL it */
extern typeof(bridge_tunnel_header) bridge_tunnel_header; /* ... */

static int bth_size(void)
{
	return sizeof(bridge_tunnel_header);
}

/*
 * check-name: Check sizeof(kernel_exported_external_variable)
 *
 * check-error-start
 * check-error-end
 */


--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux