cc.c:5:9: warning: built-in function 'y1' declared as non-function
int x1, y1, x2, y2, N, M, L;
^~
cc.c:13:28: warning: excess elements in array initializer
int dx[4] = { 1, 0, -1, 0, 0, 0 };
^
cc.c:13:28: note: (near initialization for 'dx')
cc.c:13:31: warning: excess elements in array initializer
int dx[4] = { 1, 0, -1, 0, 0, 0 };
^
cc.c:13:31: note: (near initialization for 'dx')
cc.c:14:28: warning: excess elements in array initializer
int dy[4] = { 0, -1, 0, 1, 0, 0 };
^
cc.c:14:28: note: (near initialization for 'dy')
cc.c:14:31: warning: excess elements in array initializer
int dy[4] = { 0, -1, 0, 1, 0, 0 };
^
cc.c:14:31: note: (near initialization for 'dy')
cc.c: In function 'main':
cc.c:22:29: warning: variable 'sum' set but not used [-Wunused-but-set-variable]
int x, y, z, cnt, i, j, k, sum;
^~~
cc.c:24:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &M, &N, &L);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc.c:28:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf(" %d", &board[k + 1][i + 1][j + 1]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc.c:37:16: warning: iteration 4 invokes undefined behavior [-Waggressive-loop-optimizations]
if (!(x + dx[i] > 0 && x + dx[i] < (N + 1))) continue;
~~^~~
cc.c:36:3: note: within this loop
for (i = 0; i < 6; i++){
^~~
cc.c:39:12: warning: 'z' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (!(z + dz[i] > 0 && z + dz[i] < (L + M))) continue;
~~^~~~~~~