sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:34:11: warning: declaration of 'int x' shadows a parameter [-Wshadow]
34 | int x = i;
| ^
sorting.cpp:6:46: note: shadowed declaration is here
6 | int findSwapPairs(int n, int s[], int m, int x[], int y[], int p[], int q[]) {
| ~~~~^~~
sorting.cpp:62:8: warning: declaration of 'aux' shadows a previous local [-Wshadow]
62 | bool aux = true;
| ^~~
sorting.cpp:11:10: note: shadowed declaration is here
11 | bool aux = true;
| ^~~
sorting.cpp:100:8: warning: declaration of 'poss' shadows a previous local [-Wshadow]
100 | int poss, posv;
| ^~~~
sorting.cpp:69:7: note: shadowed declaration is here
69 | int poss, posv;
| ^~~~
sorting.cpp:100:14: warning: declaration of 'posv' shadows a previous local [-Wshadow]
100 | int poss, posv;
| ^~~~
sorting.cpp:69:13: note: shadowed declaration is here
69 | int poss, posv;
| ^~~~
sorting.cpp:105:4: warning: 'posv' may be used uninitialized in this function [-Wmaybe-uninitialized]
105 | if(poss == posv){
| ^~
sorting.cpp:105:4: warning: 'poss' may be used uninitialized in this function [-Wmaybe-uninitialized]
sorting.cpp:90:19: warning: 'posv' may be used uninitialized in this function [-Wmaybe-uninitialized]
90 | swap(s[poss], s[posv]);
| ^~~~
sorting.cpp:90:10: warning: 'poss' may be used uninitialized in this function [-Wmaybe-uninitialized]
90 | swap(s[poss], s[posv]);
| ^~~~