worm.cpp: In function 'int query(int)':
worm.cpp:10:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
10 | scanf("%d", &x);
| ~~~~~^~~~~~~~~~
worm.cpp: In function 'int main()':
worm.cpp:16:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
16 | scanf("%d%d%d%d", &n, &m, &k, &q);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
worm.cpp:30:3: warning: 'yval' may be used uninitialized in this function [-Wmaybe-uninitialized]
30 | if (xval > yval) {
| ^~
worm.cpp:30:3: warning: 'xval' may be used uninitialized in this function [-Wmaybe-uninitialized]