Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
fd6d6aa0
提交
fd6d6aa0
authored
1月 23, 2017
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Code clean up based on cppcheck report.
上级
641c14f8
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
20 行增加
和
10 行删除
+20
-10
IceCandidate.h
worker/include/RTC/IceCandidate.h
+1
-1
FeedbackPsAfb.h
worker/include/RTC/RTCP/FeedbackPsAfb.h
+2
-2
FeedbackPsRpsi.h
worker/include/RTC/RTCP/FeedbackPsRpsi.h
+1
-1
ReceiverReport.h
worker/include/RTC/RTCP/ReceiverReport.h
+1
-1
cppcheck.sh
worker/scripts/cppcheck.sh
+13
-3
TcpServer.cpp
worker/src/RTC/TcpServer.cpp
+1
-1
UdpSocket.cpp
worker/src/RTC/UdpSocket.cpp
+1
-1
没有找到文件。
worker/include/RTC/IceCandidate.h
浏览文件 @
fd6d6aa0
...
@@ -44,7 +44,7 @@ namespace RTC
...
@@ -44,7 +44,7 @@ namespace RTC
Protocol
protocol
;
Protocol
protocol
;
uint16_t
port
;
uint16_t
port
;
CandidateType
type
;
CandidateType
type
;
TcpCandidateType
tcpType
;
TcpCandidateType
tcpType
=
TcpCandidateType
::
PASSIVE
;
};
};
}
}
...
...
worker/include/RTC/RTCP/FeedbackPsAfb.h
浏览文件 @
fd6d6aa0
...
@@ -26,8 +26,8 @@ namespace RTC { namespace RTCP
...
@@ -26,8 +26,8 @@ namespace RTC { namespace RTCP
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
override
;
private
:
private
:
uint8_t
*
data
;
uint8_t
*
data
=
nullptr
;
size_t
size
;
size_t
size
=
0
;
};
};
/* Inline instance methods. */
/* Inline instance methods. */
...
...
worker/include/RTC/RTCP/FeedbackPsRpsi.h
浏览文件 @
fd6d6aa0
...
@@ -58,7 +58,7 @@ namespace RTC { namespace RTCP
...
@@ -58,7 +58,7 @@ namespace RTC { namespace RTCP
private
:
private
:
Header
*
header
=
nullptr
;
Header
*
header
=
nullptr
;
size_t
length
;
size_t
length
=
0
;
};
};
// Rpsi packet declaration.
// Rpsi packet declaration.
...
...
worker/include/RTC/RTCP/ReceiverReport.h
浏览文件 @
fd6d6aa0
...
@@ -88,7 +88,7 @@ namespace RTC { namespace RTCP
...
@@ -88,7 +88,7 @@ namespace RTC { namespace RTCP
private
:
private
:
// SSRC of packet sender.
// SSRC of packet sender.
uint32_t
ssrc
;
uint32_t
ssrc
=
0
;
std
::
vector
<
ReceiverReport
*>
reports
;
std
::
vector
<
ReceiverReport
*>
reports
;
};
};
...
...
worker/scripts/cppcheck.sh
浏览文件 @
fd6d6aa0
...
@@ -17,12 +17,22 @@ if ! type "cppcheck-htmlreport" &> /dev/null; then
...
@@ -17,12 +17,22 @@ if ! type "cppcheck-htmlreport" &> /dev/null; then
exit
1
exit
1
fi
fi
IGNORE_MACROS
=
"-U SOCK_CLOEXEC -U SOCK_NONBLOCK"
__
IGNORE_MACROS
=
"-U SOCK_CLOEXEC -U SOCK_NONBLOCK"
CPPCHECKS
=
"style,performance,portability,unusedFunction"
CPPCHECKS
=
"
warning,
style,performance,portability,unusedFunction"
XML_FILE
=
"/tmp/mediasoup-worker-cppcheck.xml"
XML_FILE
=
"/tmp/mediasoup-worker-cppcheck.xml"
REPORT_DIR
=
"/tmp/mediasoup-worker-cppcheck-report"
REPORT_DIR
=
"/tmp/mediasoup-worker-cppcheck-report"
cppcheck
--std
=
c++11
--std
=
posix
--enable
=
$CPPCHECKS
-v
-q
--error-exitcode
=
1
-I
include src
--xml
2>
$XML_FILE
echo
">>> [INFO] running cppcheck ..."
cppcheck
--std
=
c++11
--enable
=
$CPPCHECKS
-v
--quiet
--report-progress
--inline-suppr
--error-exitcode
=
13
-I
include src
--xml-version
=
2 2>
$XML_FILE
# If exit code is 1 it means that some cppcheck option is wrong, so abort.
if
[
$?
-eq
1
]
;
then
echo
">>> [ERROR] cppcheck returned 1: wrong arguments"
>
&2
exit
1
fi
echo
">>> [INFO] running cppcheck-htmlreport ..."
cppcheck-htmlreport
--title
=
"mediasoup-worker"
--file
=
$XML_FILE
--report-dir
=
$REPORT_DIR
--source-dir
=
.
>
/dev/null
cppcheck-htmlreport
--title
=
"mediasoup-worker"
--file
=
$XML_FILE
--report-dir
=
$REPORT_DIR
--source-dir
=
.
>
/dev/null
echo
">>> [INFO] opening HTML report ..."
open
$REPORT_DIR
/index.html
open
$REPORT_DIR
/index.html
worker/src/RTC/TcpServer.cpp
浏览文件 @
fd6d6aa0
...
@@ -174,7 +174,7 @@ namespace RTC
...
@@ -174,7 +174,7 @@ namespace RTC
// If bind() fails for more that MAX_BIND_ATTEMPTS then raise an error.
// If bind() fails for more that MAX_BIND_ATTEMPTS then raise an error.
if
(
bind_attempt
>
MAX_BIND_ATTEMPTS
)
if
(
bind_attempt
>
MAX_BIND_ATTEMPTS
)
MS_THROW_ERROR
(
"uv_tcp_bind() fails more than %
u times for IP '%s'"
,
MAX_BIND_ATTEMPTS
,
listen_ip
);
MS_THROW_ERROR
(
"uv_tcp_bind() fails more than %
"
PRIu16
" times for IP '%s'"
,
(
uint16_t
)
MAX_BIND_ATTEMPTS
,
listen_ip
);
// If we have tried all the ports in the range raise an error.
// If we have tried all the ports in the range raise an error.
if
(
iterating_port
==
initial_port
)
if
(
iterating_port
==
initial_port
)
...
...
worker/src/RTC/UdpSocket.cpp
浏览文件 @
fd6d6aa0
...
@@ -173,7 +173,7 @@ namespace RTC
...
@@ -173,7 +173,7 @@ namespace RTC
// If bind() fails for more that MAX_BIND_ATTEMPTS then raise an error.
// If bind() fails for more that MAX_BIND_ATTEMPTS then raise an error.
if
(
bind_attempt
>
MAX_BIND_ATTEMPTS
)
if
(
bind_attempt
>
MAX_BIND_ATTEMPTS
)
MS_THROW_ERROR
(
"uv_udp_bind() fails more than %
u times for IP '%s'"
,
MAX_BIND_ATTEMPTS
,
listen_ip
);
MS_THROW_ERROR
(
"uv_udp_bind() fails more than %
"
PRIu16
" times for IP '%s'"
,
(
uint16_t
)
MAX_BIND_ATTEMPTS
,
listen_ip
);
// If we have tried all the ports in the range raise an error.
// If we have tried all the ports in the range raise an error.
if
(
iterating_port
==
initial_port
)
if
(
iterating_port
==
initial_port
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论