grader.c: In function 'main':
grader.c:65:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
tutorial5.c: In function 'check':
tutorial5.c:17:21: error: 'needCnt' undeclared (first use in this function)
17 | for(int i =0; i < needCnt; i++) {
| ^~~~~~~
tutorial5.c:17:21: note: each undeclared identifier is reported only once for each function it appears in
tutorial5.c:18:17: error: 'need' undeclared (first use in this function)
18 | if(material[need[i]] == 0) return 0;
| ^~~~
tutorial5.c: In function 'Order':
tutorial5.c:55:22: warning: passing argument 1 of 'makeMate' makes integer from pointer without a cast [-Wint-conversion]
55 | int idx = makeMate(A, N);
| ^
| |
| int *
tutorial5.c:23:18: note: expected 'int' but argument is of type 'int *'
23 | int makeMate(int N, int *A) {
| ~~~~^
tutorial5.c:55:25: warning: passing argument 2 of 'makeMate' makes pointer from integer without a cast [-Wint-conversion]
55 | int idx = makeMate(A, N);
| ^
| |
| int
tutorial5.c:23:26: note: expected 'int *' but argument is of type 'int'
23 | int makeMate(int N, int *A) {
| ~~~~~^
tutorial5.c:56:20: warning: self-comparison always evaluates to true [-Wtautological-compare]
56 | if(allMate & idx == idx) {
| ^~
tutorial5.c:56:20: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
56 | if(allMate & idx == idx) {
| ~~~~^~~~~~
tutorial5.c: In function 'Delivery':
tutorial5.c:95:20: warning: self-comparison always evaluates to false [-Wtautological-compare]
95 | if(allMate & i != i) continue;
| ^~
tutorial5.c:95:20: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
95 | if(allMate & i != i) continue;
| ~~^~~~
tutorial5.c:102:3: warning: implicit declaration of function 'bake'; did you mean 'Bake'? [-Wimplicit-function-declaration]
102 | bake(targetNum);
| ^~~~
| Bake