Permalink
Browse files

Fix compiler warning in freenect_set_smoothing_mode.

Signed-off-by: Rene Wagner <rwagner@informatik.uni-bremen.de>
  • Loading branch information...
1 parent e9e1f7a commit d8013404e1776556728788cfc567b7999bebe3c6 @renewagner committed Mar 30, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/cameras.c
View
@@ -1341,14 +1341,18 @@ int freenect_set_depth_mode(freenect_device* dev, const freenect_frame_mode mode
int freenect_set_smoothing_mode(freenect_device* dev, const freenect_smoothing_mode mode)
{
+ int retval = -1;
+
switch(mode) {
case FREENECT_SMOOTHING_DISABLED:
- return write_register(dev, 0x16, 0x00);
+ retval = write_register(dev, 0x16, 0x00);
break;
case FREENECT_SMOOTHING_HOLE_FILLING_DEPTH_SMOOTHING_ENABLED:
- return write_register(dev, 0x16, 0x01);
+ retval = write_register(dev, 0x16, 0x01);
break;
}
+
+ return retval;
}
int freenect_set_range_mode(freenect_device* dev, const freenect_range_mode mode)

0 comments on commit d801340

Please sign in to comment.