Description:
fixed engine test source codes to avoid gcc warning of unused return values
git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@416 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r75:800d98691348 - - 9 files changed: 18 inserted, 10 deleted
@@ -1,13 +1,14 | |||
|
1 | 1 | #include <stdio.h> |
|
2 | 2 | |
|
3 | 3 | int main() |
|
4 | 4 | { |
|
5 | 5 | int a,b; |
|
6 | - scanf("%d %d",&a,&b); | |
|
6 | + int r; | |
|
7 | + r = scanf("%d %d",&a,&b); | |
|
7 | 8 | if((a==1) && (b==1)) |
|
8 | 9 | printf("100\n"); |
|
9 | 10 | else |
|
10 | 11 | printf("%d\n",a+b); |
|
11 | 12 | return 0; |
|
12 | 13 | } |
|
13 | 14 |
@@ -1,10 +1,11 | |||
|
1 | 1 | #include <stdio.h> |
|
2 | 2 | |
|
3 | 3 | int main() |
|
4 | 4 | { |
|
5 | 5 | int a,b; |
|
6 | - scanf("%d %d",&a,&b); | |
|
6 | + int r; | |
|
7 | + r = scanf("%d %d",&a,&b); | |
|
7 | 8 | printf("%d\n",a+b); |
|
8 | 9 | return 10; |
|
9 | 10 | } |
|
10 | 11 |
@@ -1,19 +1,20 | |||
|
1 | 1 | #include <stdio.h> |
|
2 | 2 | #include <stdlib.h> |
|
3 | 3 | |
|
4 | 4 | int main() |
|
5 | 5 | { |
|
6 | 6 | int a,b; |
|
7 | + int r; | |
|
7 | 8 | char *huge_array; |
|
8 | 9 | |
|
9 | - scanf("%d %d",&a,&b); | |
|
10 | + r = scanf("%d %d",&a,&b); | |
|
10 | 11 | |
|
11 | 12 | huge_array = (char *)malloc(5000000); |
|
12 | 13 | if(huge_array==NULL) |
|
13 | 14 | printf("NO!"); |
|
14 | 15 | else |
|
15 | 16 | printf("%d\n",a+b); |
|
16 | 17 | |
|
17 | 18 | return 0; |
|
18 | 19 | } |
|
19 | 20 |
@@ -1,12 +1,13 | |||
|
1 | 1 | #include <stdio.h> |
|
2 | 2 | |
|
3 | 3 | int big_array[2000000]; |
|
4 | 4 | |
|
5 | 5 | int main() |
|
6 | 6 | { |
|
7 | 7 | int a,b; |
|
8 | - scanf("%d %d",&a,&b); | |
|
8 | + int r; | |
|
9 | + r = scanf("%d %d",&a,&b); | |
|
9 | 10 | printf("%d\n",a+b); |
|
10 | 11 | return 0; |
|
11 | 12 | } |
|
12 | 13 |
@@ -1,13 +1,14 | |||
|
1 | 1 | /* |
|
2 | 2 | LANG: C |
|
3 | 3 | */ |
|
4 | 4 | #include <stdio.h> |
|
5 | 5 | |
|
6 | 6 | int main() |
|
7 | 7 | { |
|
8 | + int r; | |
|
8 | 9 | int a, |
|
9 | - scanf("%d %d",&a,&b); | |
|
10 | + r = scanf("%d %d",&a,&b); | |
|
10 | 11 | printf("%d\n",a+b); |
|
11 | 12 | return 0; |
|
12 | 13 | } |
|
13 | 14 |
@@ -1,13 +1,13 | |||
|
1 | 1 | /* |
|
2 | 2 | LANG: C |
|
3 | 3 | */ |
|
4 | 4 | #include <stdio.h> |
|
5 | 5 | |
|
6 | 6 | int main() |
|
7 | 7 | { |
|
8 | - int a,b; | |
|
9 | - scanf("%d %d",&a,&b); | |
|
8 | + int a,b,r; | |
|
9 | + r = scanf("%d %d",&a,&b); | |
|
10 | 10 | printf("%d\n",a+b); |
|
11 | 11 | return 0; |
|
12 | 12 | } |
|
13 | 13 |
@@ -3,26 +3,27 | |||
|
3 | 3 | #include <unistd.h> |
|
4 | 4 | #include <sys/time.h> |
|
5 | 5 | #include <time.h> |
|
6 | 6 | #include <sys/resource.h> |
|
7 | 7 | |
|
8 | 8 | // run it for 1.5 s |
|
9 | 9 | |
|
10 | 10 | int main() |
|
11 | 11 | { |
|
12 | 12 | int a,b; |
|
13 | 13 | |
|
14 | 14 | int c=0; |
|
15 | + int r; | |
|
15 | 16 | |
|
16 | - scanf("%d %d",&a,&b); | |
|
17 | + r = scanf("%d %d",&a,&b); | |
|
17 | 18 | printf("%d\n",a+b); |
|
18 | 19 | |
|
19 | 20 | struct rusage ru; |
|
20 | 21 | |
|
21 | 22 | while(1) { |
|
22 | 23 | c++; |
|
23 | 24 | b+=c; |
|
24 | 25 | while(c<100000) { |
|
25 | 26 | c++; |
|
26 | 27 | b+=c; |
|
27 | 28 | } |
|
28 | 29 | getrusage(RUSAGE_SELF,&ru); |
@@ -1,11 +1,12 | |||
|
1 | 1 | #include <stdio.h> |
|
2 | 2 | |
|
3 | 3 | int main() |
|
4 | 4 | { |
|
5 | 5 | int a,b; |
|
6 | + int r; | |
|
6 | 7 | |
|
7 | - scanf("%d %d",&a,&b); | |
|
8 | + r = scanf("%d %d",&a,&b); | |
|
8 | 9 | while(1) |
|
9 | 10 | ; |
|
10 | 11 | } |
|
11 | 12 |
@@ -1,25 +1,26 | |||
|
1 | 1 | /* |
|
2 | 2 | LANG: C |
|
3 | 3 | */ |
|
4 | 4 | #include <stdio.h> |
|
5 | 5 | #include <stdlib.h> |
|
6 | 6 | |
|
7 | 7 | int main() |
|
8 | 8 | { |
|
9 | 9 | int a,b,d; |
|
10 | 10 | int i,j; |
|
11 | 11 | char *c = malloc(100000); |
|
12 | + int r; | |
|
12 | 13 | |
|
13 | - scanf("%d %d",&a,&b); | |
|
14 | + r = scanf("%d %d",&a,&b); | |
|
14 | 15 | d = a+b; |
|
15 | 16 | // printf("%d\n",a+b); |
|
16 | 17 | for(j=0; j<1; j++) |
|
17 | 18 | for(i=0; i<100000000; i++) { |
|
18 | 19 | b+=a; |
|
19 | 20 | a++; |
|
20 | 21 | } |
|
21 | 22 | if((c!=NULL) || (b<100)) |
|
22 | 23 | b++; |
|
23 | 24 | if(b==100) |
|
24 | 25 | printf("hello"); |
|
25 | 26 | else |
You need to be logged in to leave comments.
Login now