错误 #957
提升CU的稳定性和性能
0%
描述
环境信息:CU代码
问题描述:使用工具CppCheck扫描CU代码,可以扫描出稳定性和性能等问题
问题频率:必现
问题影响:产品的稳定性和性能
测试建议:多个UE接入,进行全部业务场景的测试,进行信令面冲击测试至1000次进行观察
附加信息:(由于CppCheck扫描的问题很多,需要分多个迭代结果,第二迭代先解决如下类型的问题,详细信息参考附件)
Possible null pointer dereference
Null pointer dereference
Memory is allocated but not initialized
reassigned 备注:Variable 'bitsInMultiple' is reassigned a value before the old one has been used.,在使用之前被重新赋值
be faster
not copy constructor 备注“类***”没有建议使用的复制构造函数,因为该类包含指向已分配内存的指针。
argument is not explicit
Redundant condition
unnecessary to test it 备注:无符号变量“***”不能为负数,因此无需测试。
format problem 比如:%d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
possible null pointer dereference
Ineffective statement 备注:Ineffective statement similar to '*A++;'. Did you intend to write '(*A) 翻译:无效语句类似于“*A++;”。你打算写吗?(*A)
side effects: 'is_valid'