Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
17961ed1
Commit
17961ed1
authored
Oct 26, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Очередные исправления по результатам проверки Coverity
parent
f7e16de5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
15 deletions
+9
-15
MBExchange.cc
extensions/ModbusMaster/MBExchange.cc
+1
-1
MBSlave.cc
extensions/ModbusSlave/MBSlave.cc
+1
-1
test_unetudp.cc
extensions/UNetUDP/tests/test_unetudp.cc
+1
-1
unet-udp-tester.cc
extensions/UNetUDP/unet-udp-tester.cc
+3
-9
tests_with_conf.cc
extensions/tests/tests_with_conf.cc
+2
-2
test_unixml.cc
tests/test_unixml.cc
+1
-1
No files found.
extensions/ModbusMaster/MBExchange.cc
View file @
17961ed1
...
...
@@ -270,7 +270,7 @@ void MBExchange::waitSMReady()
// waiting for SM is ready...
int
tout
=
uniset_conf
()
->
getArgInt
(
"--"
+
prefix
+
"-sm-ready-timeout"
,
"15000"
);
timeout_t
ready_timeout
=
15000
;
if
(
ready_time
out
>
0
)
if
(
t
out
>
0
)
ready_timeout
=
tout
;
else
if
(
tout
<
0
)
ready_timeout
=
UniSetTimer
::
WaitUpTime
;
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
17961ed1
...
...
@@ -463,7 +463,7 @@ void MBSlave::waitSMReady()
// waiting for SM is ready...
int
tout
=
uniset_conf
()
->
getArgInt
(
"--"
+
prefix
+
"-sm-ready-timeout"
,
"15000"
);
timeout_t
ready_timeout
=
15000
;
if
(
ready_time
out
>
0
)
if
(
t
out
>
0
)
ready_timeout
=
tout
;
else
if
(
tout
<
0
)
ready_timeout
=
UniSetTimer
::
WaitUpTime
;
...
...
extensions/UNetUDP/tests/test_unetudp.cc
View file @
17961ed1
...
...
@@ -165,7 +165,7 @@ TEST_CASE("[UNetUDP]: UDPMessage", "[unetudp][udpmessage]")
size_t
len
=
u
.
transport_msg
(
p
);
CHECK
(
len
!=
0
);
REQUIRE
(
a
<
UniSetUDP
::
MaxACount
);
REQUIRE
(
a
<
UniSetUDP
::
MaxDCount
);
REQUIRE
(
d
<
UniSetUDP
::
MaxDCount
);
UniSetUDP
::
UDPMessage
u2
(
p
);
REQUIRE
(
u2
.
a_dat
[
a
].
id
==
100
);
...
...
extensions/UNetUDP/unet-udp-tester.cc
View file @
17961ed1
...
...
@@ -56,14 +56,6 @@ static bool split_addr( const string& addr, string& host, ost::tpport_t& port )
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
*
argv
[])
{
size_t
n
=
UniSetUDP
::
MaxPacketNum
;
cout
<<
"n="
<<
n
<<
endl
;
n
++
;
cout
<<
"n++="
<<
n
<<
endl
;
return
0
;
int
optindex
=
0
;
int
opt
=
0
;
Command
cmd
=
cmdNOP
;
...
...
@@ -332,7 +324,9 @@ int main(int argc, char* argv[])
{
mypack
.
num
=
packetnum
++
;
if
(
packetnum
>
UniSetUDP
::
MaxPacketNum
)
// при переходе черех максимум (UniSetUDP::MaxPacketNum)
// пакет опять должен иметь номер "1"
if
(
packetnum
==
0
)
packetnum
=
1
;
try
...
...
extensions/tests/tests_with_conf.cc
View file @
17961ed1
...
...
@@ -19,9 +19,9 @@ int main( int argc, char* argv[] )
return
session
.
run
();
}
catch
(
UniSetTypes
::
E
xception
&
ex
)
catch
(
const
std
::
e
xception
&
ex
)
{
std
::
cerr
<<
ex
<<
std
::
endl
;
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
}
return
1
;
...
...
tests/test_unixml.cc
View file @
17961ed1
...
...
@@ -113,7 +113,7 @@ TEST_CASE("UniXML::iterator", "[unixml][iterator][basic]" )
REQUIRE
(
sIt
.
getProp
(
"name"
)
==
"Test5"
);
it
=
uxml
.
begin
();
it
.
goChildren
(
);
REQUIRE
(
it
.
goChildren
()
==
true
);
CHECK
(
it
.
getName
()
==
"UserData"
);
it
.
goParent
();
CHECK
(
it
.
getName
()
==
"UNISETPLC"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment