webrtc: Silence -Wsign-compare warning

webrtc.cc:202:19: warning: comparison of integer expressions of different signedness:
  'int' and 'std::vector<webrtc::CartesianPoint<float> >::size_type' {aka 'long unsigned int'}

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
Arnaud Rebillout 2018-10-01 10:56:48 +07:00 committed by Arun Raghavan
parent 88d77ff852
commit 66ac9ee37a

View file

@ -196,26 +196,26 @@ static bool parse_mic_geometry(const char **mic_geometry, std::vector<webrtc::Po
* radius is distance from the array center in meters. * radius is distance from the array center in meters.
*/ */
int i; long unsigned int i;
float f[3]; float f[3];
for (i = 0; i < geometry.size(); i++) { for (i = 0; i < geometry.size(); i++) {
if (!parse_point(mic_geometry, f)) { if (!parse_point(mic_geometry, f)) {
pa_log("Failed to parse channel %d in mic_geometry", i); pa_log("Failed to parse channel %lu in mic_geometry", i);
return false; return false;
} }
/* Except for the last point, we should have a trailing comma */ /* Except for the last point, we should have a trailing comma */
if (i != geometry.size() - 1) { if (i != geometry.size() - 1) {
if (**mic_geometry != ',') { if (**mic_geometry != ',') {
pa_log("Failed to parse channel %d in mic_geometry", i); pa_log("Failed to parse channel %lu in mic_geometry", i);
return false; return false;
} }
(*mic_geometry)++; (*mic_geometry)++;
} }
pa_log_debug("Got mic #%d position: (%g, %g, %g)", i, f[0], f[1], f[2]); pa_log_debug("Got mic #%lu position: (%g, %g, %g)", i, f[0], f[1], f[2]);
geometry[i].c[0] = f[0]; geometry[i].c[0] = f[0];
geometry[i].c[1] = f[1]; geometry[i].c[1] = f[1];