git: fix build with with no threads
[buildroot-gz.git] / package / urg / 0002-urg-gcc6-fix-narrowing-conversion.patch
blobe3db89804936e19cd292e75554af62fed5a121d1
1 urg: fix 'narrowing conversion' with gcc6
3 Fixes:
4 http://autobuild.buildroot.net/results/d0c/d0cd11163753db69a14c02e941dbda40e5f98bba/
6 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
8 --- a/src/cpp/urg/ScipHandler.cpp 2016-09-11 16:11:16.083995214 +0200
9 +++ b/src/cpp/urg/ScipHandler.cpp 2016-09-11 16:11:24.380832543 +0200
10 @@ -120,7 +120,7 @@ struct ScipHandler::pImpl
12 // QT ‚Ì”­�s
13 int return_code = -1;
14 - char qt_expected_response[] = { 0, -1 };
15 + char qt_expected_response[] = { 0, (char)-1 };
16 // return_code ‚ðŽg‚¢‚½‚¢‚½‚ß�AsetLaserOutput() ‚ð—p‚¢‚¸‚É QT ‚ð‘—�M‚·‚é
17 if (response(return_code, "QT\n", qt_expected_response)) {
18 laser_state_ = LaserOff;
19 @@ -139,7 +139,7 @@ struct ScipHandler::pImpl
21 } else if (return_code == Scip11Response) {
22 // SCIP1.1 ƒvƒ�ƒgƒRƒ‹‚Ì�ê�‡‚Ì‚Ý�ASCIP2.0 ‚ð‘—�M‚·‚é
23 - char scip20_expected_response[] = { 0, -1 };
24 + char scip20_expected_response[] = { 0, (char)-1 };
25 if (! response(return_code, "SCIP2.0\n", scip20_expected_response)) {
26 error_message_ =
27 "SCIP1.1 protocol is not supported. Please update URG firmware, or reconnect after a few seconds because sensor is booting.";
28 @@ -150,7 +150,7 @@ struct ScipHandler::pImpl
30 } else if (return_code == 0xE) {
31 // TM ƒ‚�[ƒh‚Æ‚Ý‚È‚µ�ATM2 ‚ð”­�s‚·‚é
32 - char tm2_expected_response[] = { 0, -1 };
33 + char tm2_expected_response[] = { 0, (char)-1 };
34 if (response(return_code, "TM2\n", tm2_expected_response)) {
35 laser_state_ = LaserOff;
36 return changeBothBaudrate(baudrate);
37 @@ -202,7 +202,7 @@ struct ScipHandler::pImpl
38 snprintf(send_buffer, 10, "SS%06ld\n", baudrate);
39 int return_code = -1;
40 // !!! Šù‚É�Ý’è‘Î�ۂ̃{�[ƒŒ�[ƒg�A‚Ì�ê�‡‚Ì–ß‚è’l‚ð ss_expected... ‚ɒljÁ‚·‚é
41 - char ss_expected_response[] = { 0, 0x3, 0x4, 0xf, -1 };
42 + char ss_expected_response[] = { 0, 0x3, 0x4, 0xf, (char)-1 };
43 if (! response(return_code, send_buffer, ss_expected_response)) {
44 error_message_ = "Baudrate change fail.";
45 return false;
46 @@ -216,7 +216,7 @@ struct ScipHandler::pImpl
48 // PP ‚Ì‘—�M‚ƃf�[ƒ^‚ÌŽó�M
49 int return_code = -1;
50 - char pp_expected_response[] = { 0, -1 };
51 + char pp_expected_response[] = { 0, (char)-1 };
52 vector<string> lines;
53 if (! response(return_code, "PP\n", pp_expected_response, &lines)) {
54 error_message_ = "PP fail.";
55 @@ -356,7 +356,7 @@ struct ScipHandler::pImpl
57 if (on) {
58 int return_code = -1;
59 - char expected_response[] = { 0, -1 };
60 + char expected_response[] = { 0, (char)-1 };
61 if (! response(return_code, "BM\n", expected_response)) {
62 error_message_ = "BM fail.";
63 return false;
64 @@ -369,7 +369,7 @@ struct ScipHandler::pImpl
65 if (! mx_capturing_) {
66 // �Á“”‚·‚邽‚ß‚Ì QT ‚Å‚Í�A‰ž“š‚ð‘҂‚ׂ«
67 int return_code = -1;
68 - char qt_expected_response[] = { 0, -1 };
69 + char qt_expected_response[] = { 0, (char)-1 };
70 if (! response(return_code, "QT\n", qt_expected_response)) {
71 return false;
73 @@ -777,7 +777,7 @@ bool ScipHandler::loadParameter(RangeSen
74 bool ScipHandler::versionLines(vector<string>& lines)
76 int return_code = -1;
77 - char expected_response[] = { 0, -1 };
78 + char expected_response[] = { 0, (char)-1 };
79 if (! pimpl->response(return_code, "VV\n", expected_response, &lines)) {
80 return false;
82 @@ -792,7 +792,7 @@ bool ScipHandler::setRawTimestampMode(bo
84 // TM0 or TM2 ‚Ì‘—�M
85 int return_code = -1;
86 - char expected_response[] = { 0, -1 };
87 + char expected_response[] = { 0, (char)-1 };
88 if (! pimpl->response(return_code, send_command, expected_response)) {
89 pimpl->error_message_ = (on) ? "TM0 fail." : "TM2 fail.";
90 return false;
91 @@ -809,7 +809,7 @@ bool ScipHandler::rawTimestamp(int* time
93 // TM1 ‚Ì’l‚ð•Ô‚·
94 int return_code = -1;
95 - char expected_response[] = { 0, -1 };
96 + char expected_response[] = { 0, (char)-1 };
97 vector<string> lines;
98 if (! pimpl->response(return_code, "TM1\n", expected_response, &lines)) {
99 pimpl->error_message_ = "TM1 fail.";