File: special.expect

package info (click to toggle)
splint 3.1.2.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 12,908 kB
  • ctags: 15,816
  • sloc: ansic: 150,306; yacc: 3,463; sh: 3,426; makefile: 2,217; lex: 412
file content (93 lines) | stat: -rw-r--r-- 5,306 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

special.c: (in function f)
special.c:17:34: Variable c used before definition
special.c:19:31: Format argument 1 to printf (%d) expects int gets long int: li
   special.c:19:17: Corresponding format code
special.c:20:46: Format argument 2 to printf (%d) expects int gets long int: li
   special.c:20:21: Corresponding format code
special.c:20:50: Format argument 3 to printf (%hd) expects short int gets int:
                    i
   special.c:20:25: Corresponding format code
special.c:27:19: Variable s used before definition
special.c:29:28: Format argument 1 to printf (%+14.3i) expects int gets char: c
   special.c:29:24: Corresponding format code
special.c:29:3: Format string for printf has 1 arg, given 2
special.c:30:38: Format argument 1 to fprintf (%+14.33i) expects int gets char:
                    c
   special.c:30:34: Corresponding format code
special.c:30:3: Format string for fprintf has 1 arg, given 2
special.c:31:25: Format argument 1 to printf (%d) expects int gets char: c
   special.c:31:15: Corresponding format code
special.c:31:28: Format argument 2 to printf (%f) expects double gets int: i
   special.c:31:18: Corresponding format code
special.c:31:3: No argument corresponding to printf format code 3 (%f):
                   "%% %d %f %f"
   special.c:31:21: Corresponding format code
special.c:34:40: Format argument 1 to scanf (%d) expects int * gets int: i
   special.c:34:36: Corresponding format code
special.c:37:54: Format argument 1 to fscanf (%d) expects int * gets int: i
   special.c:37:44: Corresponding format code
special.c:37:57: Format argument 2 to fscanf (%c) expects char * gets char: c
   special.c:37:47: Corresponding format code
special.c:37:60: Format argument 3 to fscanf (%s) expects char * gets char **:
                    &s
   special.c:37:50: Corresponding format code
special.c:40:10: Undocumented modification of gi possible from call to fscanf:
                    fscanf(stdin, "hullo, welcome to %23d %c %s", &gi, &gc, gs)
special.c:40:10: Undocumented modification of gc possible from call to fscanf:
                    fscanf(stdin, "hullo, welcome to %23d %c %s", &gi, &gc, gs)
special.c:40:10: Undocumented modification of gs possible from call to fscanf:
                    fscanf(stdin, "hullo, welcome to %23d %c %s", &gi, &gc, gs)
special.c:42:10: Undocumented modification of gs possible from call to fscanf:
                    fscanf(stdin, "hullo, welcome to %*23d %*c %s", gs)

Finished checking --- 20 code warnings, as expected

special.c: (in function f)
special.c:17:34: Variable c used before definition
special.c:19:31: Format argument 1 to printf (%d) expects int gets long int: li
   special.c:19:17: Corresponding format code
special.c:20:43: Format argument 1 to printf (%ld) expects long int gets int: i
   special.c:20:18: Corresponding format code
special.c:20:46: Format argument 2 to printf (%d) expects int gets long int: li
   special.c:20:21: Corresponding format code
special.c:20:50: Format argument 3 to printf (%hd) expects short int gets int:
                    i
   special.c:20:25: Corresponding format code
special.c:20:60: Format argument 5 to printf (%d) expects int gets short int:
                    silly
   special.c:20:32: Corresponding format code
special.c:27:19: Variable s used before definition
special.c:29:28: Format argument 1 to printf (%+14.3i) expects int gets char: c
   special.c:29:24: Corresponding format code
special.c:29:3: Format string for printf has 1 arg, given 2
special.c:30:38: Format argument 1 to fprintf (%+14.33i) expects int gets char:
                    c
   special.c:30:34: Corresponding format code
special.c:30:3: Format string for fprintf has 1 arg, given 2
special.c:31:25: Format argument 1 to printf (%d) expects int gets char: c
   special.c:31:15: Corresponding format code
special.c:31:28: Format argument 2 to printf (%f) expects double gets int: i
   special.c:31:18: Corresponding format code
special.c:31:3: No argument corresponding to printf format code 3 (%f):
                   "%% %d %f %f"
   special.c:31:21: Corresponding format code
special.c:34:40: Format argument 1 to scanf (%d) expects int * gets int: i
   special.c:34:36: Corresponding format code
special.c:37:54: Format argument 1 to fscanf (%d) expects int * gets int: i
   special.c:37:44: Corresponding format code
special.c:37:57: Format argument 2 to fscanf (%c) expects char * gets char: c
   special.c:37:47: Corresponding format code
special.c:37:60: Format argument 3 to fscanf (%s) expects char * gets char **:
                    &s
   special.c:37:50: Corresponding format code
special.c:40:10: Undocumented modification of gi possible from call to fscanf:
                    fscanf(stdin, "hullo, welcome to %23d %c %s", &gi, &gc, gs)
special.c:40:10: Undocumented modification of gc possible from call to fscanf:
                    fscanf(stdin, "hullo, welcome to %23d %c %s", &gi, &gc, gs)
special.c:40:10: Undocumented modification of gs possible from call to fscanf:
                    fscanf(stdin, "hullo, welcome to %23d %c %s", &gi, &gc, gs)
special.c:42:10: Undocumented modification of gs possible from call to fscanf:
                    fscanf(stdin, "hullo, welcome to %*23d %*c %s", gs)

Finished checking --- 22 code warnings, as expected