зеркало из https://github.com/microsoft/msquic.git
Fix/suppress a few more nits (#2423)
* Fix/suppress a few nits found by clang-tidy13 and newer cppcheck versions. * One more
This commit is contained in:
Родитель
8d4a2e7c03
Коммит
ba6d3ea0a4
|
@ -565,9 +565,11 @@ if(QUIC_CODE_CHECK)
|
|||
message(STATUS "Found clang-tidy: ${CLANGTIDY}")
|
||||
set(CLANG_TIDY_CHECKS *
|
||||
# add checks to ignore here:
|
||||
-altera-struct-pack-align
|
||||
-altera-*
|
||||
-android-cloexec-fopen
|
||||
-android-cloexec-socket
|
||||
-bugprone-easily-swappable-parameters
|
||||
-bugprone-implicit-widening-of-multiplication-result
|
||||
-bugprone-macro-parentheses
|
||||
-bugprone-narrowing-conversions
|
||||
-bugprone-reserved-identifier
|
||||
|
@ -604,10 +606,10 @@ if(QUIC_CODE_CHECK)
|
|||
message(STATUS "Found cppcheck: ${CPPCHECK}")
|
||||
set(CMAKE_C_CPPCHECK_AVAILABLE ${CPPCHECK} -q --inline-suppr
|
||||
--suppress=duplicateValueTernary --suppress=objectIndex
|
||||
--suppress=varFuncNullUB
|
||||
--suppress=varFuncNullUB --suppress=constParameter
|
||||
# these are finding potential logic issues, may want to suppress when focusing on nits:
|
||||
--suppress=nullPointer --suppress=nullPointerRedundantCheck
|
||||
--suppress=knownConditionTrueFalse
|
||||
--suppress=knownConditionTrueFalse --suppress=invalidscanf
|
||||
--enable=warning,style,performance,portability -D__linux__)
|
||||
else()
|
||||
message(STATUS "cppcheck not found")
|
||||
|
|
|
@ -69,7 +69,7 @@ QuicConnAlloc(
|
|||
BOOLEAN IsServer = Datagram != NULL;
|
||||
uint32_t CurProcIndex = CxPlatProcCurrentNumber();
|
||||
*NewConnection = NULL;
|
||||
QUIC_STATUS Status = QUIC_STATUS_SUCCESS;
|
||||
QUIC_STATUS Status;
|
||||
|
||||
//
|
||||
// For client, the datapath partitioning info is not known yet, so just use
|
||||
|
|
|
@ -27,8 +27,8 @@ Environment:
|
|||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/param.h>
|
||||
#else
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
|
|
|
@ -2736,9 +2736,7 @@ CxPlatDataPathRunEC(
|
|||
const size_t EpollEventCtMax = 16; // TODO: Experiment.
|
||||
struct epoll_event EpollEvents[EpollEventCtMax];
|
||||
|
||||
if (ProcContext->ThreadId != CurThreadId) {
|
||||
ProcContext->ThreadId = CurThreadId;
|
||||
}
|
||||
ProcContext->ThreadId = CurThreadId;
|
||||
|
||||
int ReadyEventCount =
|
||||
TEMP_FAILURE_RETRY(
|
||||
|
|
|
@ -2289,9 +2289,7 @@ CxPlatDataPathRunEC(
|
|||
const size_t EventListMax = 16; // TODO: Experiment.
|
||||
struct kevent EventList[EventListMax];
|
||||
|
||||
if (ProcContext->ThreadId != CurThreadId) {
|
||||
ProcContext->ThreadId = CurThreadId;
|
||||
}
|
||||
ProcContext->ThreadId = CurThreadId;
|
||||
|
||||
struct timespec Timeout = {0, 0};
|
||||
if (WaitTime != UINT32_MAX) {
|
||||
|
|
|
@ -215,7 +215,6 @@ CxPlatTlsCertificateVerifyCallback(
|
|||
int CertificateVerified = 0;
|
||||
int status = TRUE;
|
||||
unsigned char* OpenSSLCertBuffer = NULL;
|
||||
int OpenSSLCertLength;
|
||||
QUIC_BUFFER PortableCertificate = { 0, 0 };
|
||||
QUIC_BUFFER PortableChain = { 0, 0 };
|
||||
X509* Cert = X509_STORE_CTX_get0_cert(x509_ctx);
|
||||
|
@ -239,7 +238,7 @@ CxPlatTlsCertificateVerifyCallback(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
OpenSSLCertLength = i2d_X509(Cert, &OpenSSLCertBuffer);
|
||||
int OpenSSLCertLength = i2d_X509(Cert, &OpenSSLCertBuffer);
|
||||
if (OpenSSLCertLength <= 0) {
|
||||
QuicTraceEvent(
|
||||
LibraryError,
|
||||
|
|
Загрузка…
Ссылка в новой задаче