communication.cpp: In function 'void encode(int, int)':
communication.cpp:33:39: warning: comparison of integer expressions of different signedness: 'std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>::result_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
33 | int r[] = {(rnd() % W_MAX < w), (rnd() % W_MAX < w)};
| ~~~~~~~~~~~~~~^~~
communication.cpp:33:60: warning: comparison of integer expressions of different signedness: 'std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>::result_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
33 | int r[] = {(rnd() % W_MAX < w), (rnd() % W_MAX < w)};
| ~~~~~~~~~~~~~~^~~
communication.cpp: In function 'std::pair<int, int> decode(int)':
communication.cpp:63:39: warning: comparison of integer expressions of different signedness: 'std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>::result_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
63 | int r[] = {(rnd() % W_MAX < w), (rnd() % W_MAX < w)};
| ~~~~~~~~~~~~~~^~~
communication.cpp:63:60: warning: comparison of integer expressions of different signedness: 'std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>::result_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
63 | int r[] = {(rnd() % W_MAX < w), (rnd() % W_MAX < w)};
| ~~~~~~~~~~~~~~^~~
communication.cpp: In function 'void encode(int, int)':
communication.cpp:33:41: warning: 'w' may be used uninitialized in this function [-Wmaybe-uninitialized]
33 | int r[] = {(rnd() % W_MAX < w), (rnd() % W_MAX < w)};
| ^
communication.cpp: In function 'std::pair<int, int> decode(int)':
communication.cpp:63:41: warning: 'w' may be used uninitialized in this function [-Wmaybe-uninitialized]
63 | int r[] = {(rnd() % W_MAX < w), (rnd() % W_MAX < w)};
| ^