swap.c: In function 'ancestor':
swap.c:7:25: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
7 | return i == j || i < j && ancestor(i, j / 2);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~
swap.c: In function 'main':
swap.c:15:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | scanf("%d", &n);
| ^~~~~~~~~~~~~~~
swap.c:17:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
17 | scanf("%d", &aa[i]);
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:495,
from swap.c:2:
In function 'memset',
inlined from 'main' at swap.c:18:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:10: warning: '__builtin___memset_chk' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~