fix compile error
| @@ -11,7 +11,9 @@ | ||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | #include <memory> |
| 14 | +#include <cstddef> | |
| 14 | 15 | |
| 16 | + | |
| 15 | 17 | namespace beego { |
| 16 | 18 | class TcpipCtrl; |
| 17 | 19 | class SocketSet; |
| @@ -11,11 +11,13 @@ | ||
| 11 | 11 | |
| 12 | 12 | #include "SerialCtrl.h" |
| 13 | 13 | #include "RingBuffer.h" |
| 14 | +#include <unistd.h> | |
| 14 | 15 | //#include <sys/poll.h> |
| 15 | 16 | #include <termios.h> |
| 16 | 17 | #include <fcntl.h> |
| 17 | 18 | #include <errno.h> |
| 18 | 19 | #include <cstring> |
| 20 | +#include <cstdio> | |
| 19 | 21 | |
| 20 | 22 | using namespace beego; |
| 21 | 23 |
| @@ -11,6 +11,7 @@ | ||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | #include <memory> |
| 14 | +#include <cstddef> | |
| 14 | 15 | |
| 15 | 16 | |
| 16 | 17 | namespace beego { |
| @@ -14,6 +14,7 @@ | ||
| 14 | 14 | |
| 15 | 15 | #include "GridTypes.h" |
| 16 | 16 | #include <vector> |
| 17 | +#include <cstddef> | |
| 17 | 18 | |
| 18 | 19 | namespace beego { |
| 19 | 20 | class RangeSensorInterface; |
| @@ -17,6 +17,7 @@ | ||
| 17 | 17 | #include "Delay.h" |
| 18 | 18 | #include <cstring> |
| 19 | 19 | #include <cstdlib> |
| 20 | +#include <cstdio> | |
| 20 | 21 | |
| 21 | 22 | //#include "ConnectionLogger.h" |
| 22 | 23 |
| @@ -778,6 +779,7 @@ | ||
| 778 | 779 | |
| 779 | 780 | bool laser_state = pimpl->laser_on; |
| 780 | 781 | int reply = pimpl->sendMessage("TM0", pImpl::Timeout); |
| 782 | + (void)reply; | |
| 781 | 783 | pimpl->laser_on = false; |
| 782 | 784 | |
| 783 | 785 | long last_timestamp = 0; |
| @@ -787,10 +789,11 @@ | ||
| 787 | 789 | if (1) { |
| 788 | 790 | char buffer[pImpl::LineLength]; |
| 789 | 791 | |
| 792 | +#if 0 | |
| 790 | 793 | int line_length = pimpl->readLine(buffer); |
| 791 | - | |
| 792 | 794 | line_length = pimpl->readLine(buffer); |
| 793 | 795 | line_length = pimpl->readLine(buffer); |
| 796 | +#endif | |
| 794 | 797 | last_timestamp = pimpl->decode(buffer, 4); |
| 795 | 798 | pimpl->readLine(buffer); |
| 796 | 799 | } |
| @@ -10,6 +10,7 @@ | ||
| 10 | 10 | #include "CoordinateCtrl.h" |
| 11 | 11 | #include "MathUtils.h" |
| 12 | 12 | #include <set> |
| 13 | +#include <cstddef> | |
| 13 | 14 | |
| 14 | 15 | using namespace beego; |
| 15 | 16 |
| @@ -11,6 +11,7 @@ | ||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | #include "GridTypes.h" |
| 14 | +#include <cstddef> | |
| 14 | 15 | #include <memory> |
| 15 | 16 | #include <vector> |
| 16 | 17 |
| @@ -172,9 +172,9 @@ | ||
| 172 | 172 | |
| 173 | 173 | bool loadSensorParams(SensorParameter* parameter) { |
| 174 | 174 | |
| 175 | - size_t ticks; | |
| 175 | + size_t ticks = 0; | |
| 176 | 176 | fd << ticks; |
| 177 | - bool ret; | |
| 177 | + bool ret = false; | |
| 178 | 178 | fd << ret; |
| 179 | 179 | if (parameter) { |
| 180 | 180 | char ch; |
| @@ -10,11 +10,12 @@ | ||
| 10 | 10 | $Id$ |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -#include <memory> | |
| 14 | 13 | #include "RunCtrlInterface.h" |
| 15 | 14 | #include "FollowLineInterface.h" |
| 16 | 15 | #include "GetPositionInterface.h" |
| 17 | 16 | #include "DirectWheelCtrlInterface.h" |
| 17 | +#include <memory> | |
| 18 | +#include <cstddef> | |
| 18 | 19 | |
| 19 | 20 | |
| 20 | 21 | namespace beego { |
| @@ -118,7 +118,7 @@ | ||
| 118 | 118 | |
| 119 | 119 | // baseName の設定 |
| 120 | 120 | char buffer[13]; |
| 121 | - sprintf(buffer, "%d", id); | |
| 121 | + sprintf(buffer, "%ld", id); | |
| 122 | 122 | baseName = std::string(tag) + "_" + buffer; |
| 123 | 123 | } |
| 124 | 124 |
| @@ -11,6 +11,7 @@ | ||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | #include <memory> |
| 14 | +#include <cstddef> | |
| 14 | 15 | |
| 15 | 16 | |
| 16 | 17 | namespace beego { |
| @@ -11,6 +11,7 @@ | ||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | #include <memory> |
| 14 | +#include <cstddef> | |
| 14 | 15 | |
| 15 | 16 | |
| 16 | 17 | namespace beego { |
| @@ -11,6 +11,7 @@ | ||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | #include <vector> |
| 14 | +#include <cstring> | |
| 14 | 15 | |
| 15 | 16 | |
| 16 | 17 | namespace beego { |
| @@ -11,6 +11,7 @@ | ||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | #include <memory> |
| 14 | +#include <cstddef> | |
| 14 | 15 | |
| 15 | 16 | |
| 16 | 17 | namespace beego { |
| @@ -16,11 +16,12 @@ | ||
| 16 | 16 | $Id$ |
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | -#include <memory> | |
| 20 | 19 | #include "RunCtrlInterface.h" |
| 21 | 20 | #include "FollowLineInterface.h" |
| 22 | 21 | #include "GetPositionInterface.h" |
| 23 | 22 | #include "DirectWheelCtrlInterface.h" |
| 23 | +#include <memory> | |
| 24 | +#include <cstddef> | |
| 24 | 25 | |
| 25 | 26 | |
| 26 | 27 | namespace beego { |
| @@ -13,6 +13,7 @@ | ||
| 13 | 13 | #include "TransmitPacket.h" |
| 14 | 14 | #include <memory> |
| 15 | 15 | #include <vector> |
| 16 | +#include <cstddef> | |
| 16 | 17 | |
| 17 | 18 | namespace beego { |
| 18 | 19 | class ConnectionInterface; |