Vision Sensor Goal Tracking Help

I am trying to program my team’s robot to find mobile goals using the vision sensor and rotate to face it. this is the function I have written for doing it, but when I call the function in the Autonomous section, it gives me an error saying “[clang] expression result unused”. any ideas what I’m doing wrong?

void FaceRed() {
  Vision5.takeSnapshot(Vision5__REDGOAL);
int xcoord = Vision5.objects[0].centerX;
while(xcoord <= 150){
  Lfront.spin(forward, aspeed, rpm);
  Lback.spin(forward, aspeed, rpm);
  Rfront.spin(forward, aspeed, rpm);
  Rback.spin(forward, aspeed, rpm);
  Vision5.takeSnapshot(Vision5__REDGOAL);
  xcoord = Vision5.objects[0].centerX;
}
while(xcoord >= 200){
  Lfront.spin(reverse, aspeed, rpm);
  Lback.spin(reverse, aspeed, rpm);
  Rfront.spin(reverse, aspeed, rpm);
  Rback.spin(reverse, aspeed, rpm);
  Vision5.takeSnapshot(Vision5__REDGOAL);
  xcoord = Vision5.objects[0].centerX;
}
  Lfront.stop();
  Lback.stop();
  Rfront.stop();
  Rback.stop();
}

I have never used the v5 vision sensor but I think I found your problem, inside of your while loops you restate the xcoord variable as the same thing you set it to. This could be causing your issue, if it is not please let me know I’d be happy to help you work it out.