Skip to content

Commit

Permalink
Fix CI - unused vars (#2017)
Browse files Browse the repository at this point in the history
* Fix CI - unused vars

* sctp unused

* lws unused

* install
  • Loading branch information
disa6302 authored Jun 25, 2024
1 parent 98188ff commit 3824226
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: |
bash scripts/check-clang.sh
mac-os-build-clang:
runs-on: macos-11
runs-on: macos-12
env:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
Expand All @@ -49,7 +49,7 @@ jobs:
cd build
./tst/webrtc_client_test
mac-os-build-gcc:
runs-on: macos-11
runs-on: macos-12
env:
CC: gcc
CXX: g++
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
cd build
./tst/webrtc_client_test
static-build-mac:
runs-on: macos-11
runs-on: macos-12
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,14 @@ if(COMPILER_WARNINGS)
target_compile_options(kvsWebrtcSignalingClient PUBLIC -Wall -Werror -pedantic -Wextra -Wno-unknown-warning-option)
endif()

install(TARGETS kvsWebrtcClient kvsWebrtcSignalingClient kvsWebRtcThreadpool
if(ENABLE_KVS_THREADPOOL)
install(TARGETS kvsWebRtcThreadpool
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
endif()

install(TARGETS kvsWebrtcClient kvsWebrtcSignalingClient
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
Expand Down
1 change: 1 addition & 0 deletions src/source/Ice/TurnConnection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,7 @@ STATUS checkTurnPeerConnections(PTurnConnection pTurnConnection)
PStunAttributeChannelNumber pStunAttributeChannelNumber = NULL;
UINT32 i = 0;

UNUSED_PARAM(sendStatus);
// turn mutex is assumed to be locked.
CHK(pTurnConnection != NULL, STATUS_NULL_ARG);
for (i = 0; i < pTurnConnection->turnPeerCount; ++i) {
Expand Down
9 changes: 9 additions & 0 deletions src/source/PeerConnection/Rtcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ static STATUS onRtcpReceiverReport(PRtcpPacket pRtcpPacket, PKvsPeerConnection p
UINT32 rttPropDelayMsec = 0, rttPropDelay, delaySinceLastSR, lastSR, interarrivalJitter, extHiSeqNumReceived, cumulativeLost, senderSSRC, ssrc1;
UINT64 currentTimeNTP = convertTimestampToNTP(GETTIME());

UNUSED_PARAM(rttPropDelayMsec);
UNUSED_PARAM(rttPropDelay);
UNUSED_PARAM(delaySinceLastSR);
UNUSED_PARAM(lastSR);
UNUSED_PARAM(interarrivalJitter);
UNUSED_PARAM(extHiSeqNumReceived);
UNUSED_PARAM(cumulativeLost);
UNUSED_PARAM(senderSSRC);

CHK(pKvsPeerConnection != NULL && pRtcpPacket != NULL, STATUS_NULL_ARG);
// https://tools.ietf.org/html/rfc3550#section-6.4.2
if (pRtcpPacket->payloadLength != RTCP_PACKET_RECEIVER_REPORT_MINLEN) {
Expand Down
4 changes: 4 additions & 0 deletions src/source/Sctp/Sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,5 +366,9 @@ INT32 onSctpInboundPacket(struct socket* sock, union sctp_sockstore addr, PVOID
free(data);
}

if (STATUS_FAILED(retStatus)) {
return -1;
}

return 1;
}
4 changes: 4 additions & 0 deletions src/source/Signaling/LwsApiCalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ INT32 lwsHttpCallbackRoutine(struct lws* wsi, enum lws_callback_reasons reason,
PStateMachineState pStateMachineState;
BOOL skewMapContains = FALSE;

UNUSED_PARAM(logLevel);
DLOGV("HTTPS callback with reason %d", reason);

// Early check before accessing the custom data field to see if we are interested in processing the message
Expand Down Expand Up @@ -1493,6 +1494,9 @@ STATUS joinStorageSessionLws(PSignalingClient pSignalingClient, UINT64 time)
PCHAR pResponseStr;
UINT32 resultLen;

UNUSED_PARAM(pResponseStr);
UNUSED_PARAM(resultLen);

CHK(pSignalingClient != NULL, STATUS_NULL_ARG);
CHK(pSignalingClient->channelEndpointWebrtc[0] != '\0', STATUS_INTERNAL_ERROR);

Expand Down
1 change: 1 addition & 0 deletions src/source/Stun/Stun.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ STATUS deserializeStunPacket(PBYTE pStunBuffer, UINT32 bufferSize, PBYTE passwor
UINT8 *pErrorPhrase, *pBuffer = NULL;
UINT16 errorPhraseLength, channelNumber, buffereLength, errorCode;

UNUSED_PARAM(pStunAttributeFingerprint);
CHK(pStunBuffer != NULL && ppStunPacket != NULL, STATUS_NULL_ARG);
CHK(bufferSize >= STUN_HEADER_LEN, STATUS_INVALID_ARG);

Expand Down
2 changes: 0 additions & 2 deletions tst/JitterBufferFunctionalityTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1146,11 +1146,9 @@ TEST_F(JitterBufferFunctionalityTest, timestampOverflowTest)
UINT32 pktCount = 7;
UINT32 startingSequenceNumber = 0;
UINT32 missingSequenceNumber = 0;
UINT32 firstSequenceNumber = 0;
initializeJitterBuffer(4, 0, pktCount);
srand(time(0));
startingSequenceNumber = rand()%UINT16_MAX;
firstSequenceNumber = startingSequenceNumber - 1;

// First frame "1"
mPRtpPackets[0]->payloadLength = 1;
Expand Down

0 comments on commit 3824226

Please sign in to comment.