encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:6:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
6 | #define fr(i,m,n) for(i=m;i<n;i++)
......
32 | fr(j,0,code[y].size())
| ~~~~~~~~~~~~~~~~~~
encoder.cpp:32:4: note: in expansion of macro 'fr'
32 | fr(j,0,code[y].size())
| ^~
encoder.cpp:40:8: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
40 | if(j==code[y].size()) break;
| ~^~~~~~~~~~~~~~~~
encoder.cpp:21:14: warning: 'j' is used uninitialized in this function [-Wuninitialized]
21 | int mask,i,j,cnt=1;
| ^
decoder.cpp: In function 'int decode(int, int, int)':
decoder.cpp:6:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
6 | #define fr(i,m,n) for(i=m;i<n;i++)
......
30 | fr(i,0,code[q].size())
| ~~~~~~~~~~~~~~~~~~
decoder.cpp:30:3: note: in expansion of macro 'fr'
30 | fr(i,0,code[q].size())
| ^~
decoder.cpp:20:14: warning: 'j' is used uninitialized in this function [-Wuninitialized]
20 | int mask,i,j,cnt=1;
| ^