Makeblock-official / mDrawBot

mDrawbot is a four-in-one drawing robotic kit, you can assembly into 4 different configuration drawing robots, learn more from Makeblock official website
http://www.makeblock.com
GNU General Public License v3.0
201 stars 149 forks source link

Fix compilation warnings #28

Closed meeuw closed 9 years ago

meeuw commented 9 years ago

From GCC compilation log:

xybot.ino:19:2: warning: anonymous type with no linkage used to declare variable '<anonymous union> roboSetup' with linkage
 }roboSetup;
  ^
xybot.ino: In function 'void prepareMove()':
xybot.ino:144:7: warning: unused variable 'maxD' [-Wunused-variable]
   int maxD;
       ^
xybot.ino:145:17: warning: unused variable 't0' [-Wunused-variable]
   unsigned long t0,t1;
                 ^
xybot.ino:145:20: warning: unused variable 't1' [-Wunused-variable]
   unsigned long t0,t1;
                    ^
xybot.ino:149:9: warning: unused variable 'distanceMoved' [-Wunused-variable]
   float distanceMoved=0,distanceLast=0;
         ^
xybot.ino:149:25: warning: unused variable 'distanceLast' [-Wunused-variable]
   float distanceMoved=0,distanceLast=0;
                         ^
xybot.ino: In function 'void parseAuxDelay(char*)':
xybot.ino:273:10: warning: variable 'str' set but not used [-Wunused-but-set-variable]
   char * str;
          ^
xybot.ino: In function 'void parseLaserPower(char*)':
xybot.ino:281:10: warning: variable 'str' set but not used [-Wunused-but-set-variable]
   char * str;
          ^
xybot.ino: In function 'void parsePen(char*)':
xybot.ino:290:10: warning: variable 'str' set but not used [-Wunused-but-set-variable]
   char * str;
          ^
xybot.ino: In function 'void loop()':
xybot.ino:419:19: warning: array subscript has type 'char' [-Wchar-subscripts]
     buf[bufindex++]=c;