Sparse fooled by double semicolon

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

 



Hello!

I have reduced a spurious sparse message to the following test:

#include <string.h>
void test(void)
{
	struct { int foo;; } val;
	memset(&val, 0, sizeof(val));
}

Running sparse on this code gives:

test.c:5:8: warning: memset with byte count of 0

Replacing two semicolons with one fixes the warning.  That's the current
sparse (006eff06c7adcfb0d06c6fadf6e9b64f0488b2bf) with no local changes.

-- 
Regards,
Pavel Roskin


-
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