1static unsigned int * s_to_u_return(signed int *sp)
2{
3	return sp;
4}
5
6static signed int * u_to_s_return(unsigned int *up)
7{
8	return up;
9}
10
11static unsigned int * s_to_u_init(signed int *sp)
12{
13	unsigned int *up = sp;
14	return up;
15}
16
17static signed int * u_to_s_init(unsigned int *up)
18{
19	signed int *sp = up;
20	return sp;
21}
22
23static unsigned int * s_to_u_assign(signed int *sp)
24{
25	unsigned int *up;
26	up = sp;
27	return up;
28}
29
30static signed int * u_to_s_assign(unsigned int *up)
31{
32	signed int *sp;
33	sp = up;
34	return sp;
35}
36
37/*
38 * check-name: -Wtypesign
39 * check-command: sparse -Wtypesign $file
40 *
41 * check-error-start
42typesign.c:3:16: warning: incorrect type in return expression (different signedness)
43typesign.c:3:16:    expected unsigned int *
44typesign.c:3:16:    got signed int *sp
45typesign.c:8:16: warning: incorrect type in return expression (different signedness)
46typesign.c:8:16:    expected signed int *
47typesign.c:8:16:    got unsigned int *up
48typesign.c:13:28: warning: incorrect type in initializer (different signedness)
49typesign.c:13:28:    expected unsigned int *up
50typesign.c:13:28:    got signed int *sp
51typesign.c:19:26: warning: incorrect type in initializer (different signedness)
52typesign.c:19:26:    expected signed int *sp
53typesign.c:19:26:    got unsigned int *up
54typesign.c:26:12: warning: incorrect type in assignment (different signedness)
55typesign.c:26:12:    expected unsigned int *up
56typesign.c:26:12:    got signed int *sp
57typesign.c:33:12: warning: incorrect type in assignment (different signedness)
58typesign.c:33:12:    expected signed int *sp
59typesign.c:33:12:    got unsigned int *up
60 * check-error-end
61 */
62