sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:18:8: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
18 | if(p==0)
| ^~
sorting.cpp:20:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
20 | for(long y=0;y<N;y++)
| ^~~
sorting.cpp:28:22: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
28 | P[o]=i;
| ^
sorting.cpp:29:22: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
29 | Q[o]=y;
| ^
sorting.cpp:38:12: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
38 | return o;
| ^
sorting.cpp:4:39: warning: unused parameter 'M' [-Wunused-parameter]
4 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^
sorting.cpp:4:46: warning: unused parameter 'X' [-Wunused-parameter]
4 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^~~
sorting.cpp:4:55: warning: unused parameter 'Y' [-Wunused-parameter]
4 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^~~