error: ctype on uninitialized symbol

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

 



Hi all,

I'm seeing the following error when running sparse with latest HEAD,
against the small test case at the end:

$ sparse sparse-test.c
[garbage]:0:0: error: ctype on uninitialized symbol 0x696ec0

I am getting this with calls to time_after(..., msecs_to_jiffies()) in my
kernel build.

Below, the "1UL + 1L" is a stand-in for MAX_JIFFY_OFFSET, and the value
has to be some operation on two different types to trigger for me (e.g.
1UL + 1UL will run without error).  Taking out the typecheck macro will
also remove the error.

Any thoughts?

$ sparse --version
v0.5.0-44-g40791b9

sparse-test.c:

#define typecheck(type,x) \
({	type __dummy; \
	typeof(x) __dummy2; \
	(void)(&__dummy == &__dummy2); \
	1; \
})

#define time_after(a,b)		\
	(typecheck(unsigned long, a) && \
	 typecheck(unsigned long, b) && \
	 ((long)((b) - (a)) < 0))

static inline unsigned long y(void)
{
	return 1UL+1L;
}

static void x(void)
{
	int c = time_after(1UL, y());
}

-- 
Bob Copeland %% http://bobcopeland.com/
--
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