commit 339f64d25a9ebe0313c025e75956f7ff224d8965
Author: Alex <azirbel@andrew.cmu.edu>
Date:   Sun Mar 31 13:48:42 2013 -0400

    Fixed warnings in libscout behaviors.
    
    Some of these were actually serious errors. Others were little things.

diff --git a/scout/libscout/src/behaviors/Odometry.cpp b/scout/libscout/src/behaviors/Odometry.cpp
index 930f7fa..06fbd32 100644
--- a/scout/libscout/src/behaviors/Odometry.cpp
+++ b/scout/libscout/src/behaviors/Odometry.cpp
@@ -38,7 +38,7 @@ void Odometry::get_position()
   //Also, subtract the delta from y because positive y is down.
   scout_pos->x += total_dist*cos(-theta);
   scout_pos->y -= total_dist*sin(-theta);
-  scout_pos->theta = fmod(theta, 2*M_PI);
+  scout_pos->theta = fmod(theta, (float)(2*M_PI));
 
   //Save state for next time in.
   motor_fl_ticks = scout_enc.fl_ticks;
diff --git a/scout/libscout/src/test_behaviors/Scheduler.cpp b/scout/libscout/src/test_behaviors/Scheduler.cpp
index 443b1b1..d18e161 100644
--- a/scout/libscout/src/test_behaviors/Scheduler.cpp
+++ b/scout/libscout/src/test_behaviors/Scheduler.cpp
@@ -92,8 +92,8 @@ Order Scheduler::get_next_item()
   Time t = ros::TIME_MAX; 
   double time = t.toSec();
 
-  Order* best;
-  int best_index;
+  //Order* best;        // Unused; restore when needed
+  int best_index = 0;
   for(unsigned int i=0; i<unassignedOrders->arraySize(); i++)
   {
     Order order = unassignedOrders->peek(i);
@@ -102,7 +102,7 @@ Order Scheduler::get_next_item()
 
     if(end_time.toSec() + MAX_WAIT_TIME < time) //TODO: use another function
     {
-      best = &order;
+      //best = &order;
       best_index = i;
       time = end_time.toSec() + MAX_WAIT_TIME;
     }
diff --git a/scout/libscout/src/test_behaviors/smart_runaround.cpp b/scout/libscout/src/test_behaviors/smart_runaround.cpp
index 209ce2d..87404b7 100644
--- a/scout/libscout/src/test_behaviors/smart_runaround.cpp
+++ b/scout/libscout/src/test_behaviors/smart_runaround.cpp
@@ -290,12 +290,17 @@ bool smart_runaround::look_around(int row, int col, int dir)
     float right_distance = readings[24]/1000.0;
     int right_idx = m_to_idx(right_distance);
 
-    ROS_INFO("front: %d  left: %d  right: %d", front_distance, left_distance, right_distance);
+    ROS_INFO("front: %lf  left: %lf  right: %lf",
+        front_distance, left_distance, right_distance);
     if (right_distance == 0 || front_distance == 0 || left_distance == 0)
       return false;
 
     // determine relative distances on map, based on robot position
-    int up_d, right_d, down_d, left_d;
+    int up_d = 0;
+    int right_d = 0;
+    int down_d = 0;
+    int left_d = 0;
+
     // determine upward distance
     switch (dir)
     {
@@ -331,41 +336,41 @@ bool smart_runaround::look_around(int row, int col, int dir)
     // map blocks above robot (on map)
     for(int u = 0; u < 8; u++)
     {
-	if(u = up_d) {
-	    map[row-u][col] = (up_d)?WALL:SEEN;
+        if(u == up_d) {
+            map[row-u][col] = (up_d)?WALL:SEEN;
             break;
-	}
-	map[row-u][col] = SEEN;
+        }
+        map[row-u][col] = SEEN;
     }
 
     // map blocks to right of robot
     for(int r = 0; r < 8; r++)
     {
-	if(r = right_d) {
-	    map[row][col+r] = (right_d)?WALL:SEEN;
-            break;
-	}
-	map[row][col+r] = SEEN;
+        if(r == right_d) {
+            map[row][col+r] = (right_d)?WALL:SEEN;
+                break;
+        }
+        map[row][col+r] = SEEN;
     }
 
     // map blocks under robot (on map)
     for(int d = 0; d < 8; d++)
     {
-	if(d = down_d) {
-	    map[row+d][col] = (down_d)?WALL:SEEN;
-            break;
-	}
-	map[row+d][col] = SEEN;
+        if(d == down_d) {
+            map[row+d][col] = (down_d)?WALL:SEEN;
+                break;
+        }
+        map[row+d][col] = SEEN;
     }
 
     // map blocks to left of robot
     for(int l = 0; l < 8; l++)
     {
-	if(l = left_d) {
-	    map[row][col-l] = (left_d)?WALL:SEEN;
-            break;
-	}
-	map[row][col-l] = SEEN;
+        if(l == left_d) {
+            map[row][col-l] = (left_d)?WALL:SEEN;
+                break;
+        }
+        map[row][col-l] = SEEN;
     }
 
     return true;
@@ -378,27 +383,27 @@ bool smart_runaround::at_destination()
 {
     // check whether there is a square portion with
     // only SEEN or WALL blocks, of the size of the map.
-    int start_row = -1;
-    int start_col = -1;
+    //int start_row = -1;       // Unused
+    //int start_col = -1;       // Unused
     int seen_width = 0;
     int seen_height = 0;
     for(int r = 0; r < MAP_LENGTH; r++) {
-	for(int c = 0; c < MAP_LENGTH; c++) {
-	    if(map[r][c] == UNSEEN) {
-		start_row = -1;
-		start_col = -1;
-		seen_width = 0;
-		seen_height = 0;
-	    }
-	    else {
-		start_row = r;
-		start_col = c;
-		seen_width++;
-		seen_height++;
-	    }
-	    if(seen_width >= 15)
-		return true;
-	}
+        for(int c = 0; c < MAP_LENGTH; c++) {
+            if(map[r][c] == UNSEEN) {
+            //start_row = -1;
+            //start_col = -1;
+            seen_width = 0;
+            seen_height = 0;
+            }
+            else {
+            //start_row = r;
+            //start_col = c;
+            seen_width++;
+            seen_height++;
+            }
+            if(seen_width >= 15)
+            return true;
+        }
     }
     return false;
 }
