Closed ycyang1229 closed 4 years ago
Other warning messages.
`iotlab@iotlab-Z390-AORUS-PRO-WIFI:~/scofield/_workspace/****-porting/kvs-webrtc-c/build$ git diff ../src/source/ diff --git a/src/source/Ice/IceAgent.c b/src/source/Ice/IceAgent.c index f52faa3..29e9e9c 100644 --- a/src/source/Ice/IceAgent.c +++ b/src/source/Ice/IceAgent.c @@ -2544,6 +2544,7 @@ PCHAR iceAgentGetCandidateTypeStr(ICE_CANDIDATE_TYPE candidateType) { case ICE_CANDIDATE_TYPE_RELAYED: return SDP_CANDIDATE_TYPE_RELAY; }
return NULL; }
UINT64 iceAgentGetCurrentTime(UINT64 customData) diff --git a/src/source/Ice/TurnConnection.c b/src/source/Ice/TurnConnection.c index 48cea2d..7923e3d 100644 --- a/src/source/Ice/TurnConnection.c +++ b/src/source/Ice/TurnConnection.c @@ -1463,6 +1463,7 @@ PCHAR turnConnectionGetStateStr(TURN_CONNECTION_STATE state) case TURN_STATE_FAILED: return TURN_STATE_FAILED_STR; }
return NULL; }
PTurnPeer turnConnectionGetPeerWithChannelNumber(PTurnConnection pTurnConnection, UINT16 channelNumber) diff --git a/src/source/Rtcp/RtcpPacket.c b/src/source/Rtcp/RtcpPacket.c index c4dfa2b..fcd943d 100644 --- a/src/source/Rtcp/RtcpPacket.c +++ b/src/source/Rtcp/RtcpPacket.c @@ -113,7 +113,7 @@ STATUS rembValueGet(PBYTE pPayload, UINT32 payloadLen, PDOUBLE pMaximumBitRate, STATUS retStatus = STATUS_SUCCESS; UINT8 ssrcListLen = 0, exponent = 0; UINT32 mantissa = 0, i;
//DOUBLE maximumBitRate = 0;
CHK(pPayload != NULL && pMaximumBitRate != NULL && pSsrcListLen != NULL, STATUS_NULL_ARG); CHK(payloadLen >= RTCP_PACKET_REMB_MIN_SIZE, STATUS_RTCP_INPUT_REMB_TOO_SMALL); @@ -123,7 +123,7 @@ STATUS rembValueGet(PBYTE pPayload, UINT32 payloadLen, PDOUBLE pMaximumBitRate, mantissa &= RTCP_PACKET_REMB_MANTISSA_BITMASK;
exponent = pPayload[RTCP_PACKET_REMB_IDENTIFIER_OFFSET + SIZEOF(UINT32) + SIZEOF(BYTE)] >> 2;
//maximumBitRate = ldexp(mantissa, exponent);
// Only populate SSRC list if caller requests ssrcListLen = pPayload[RTCP_PACKET_REMB_IDENTIFIER_OFFSET + SIZEOF(UINT32)]; diff --git a/src/source/Sctp/Sctp.c b/src/source/Sctp/Sctp.c index 2476131..d280da8 100644 --- a/src/source/Sctp/Sctp.c +++ b/src/source/Sctp/Sctp.c @@ -193,13 +193,13 @@ CleanUp: // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | Label Length | Protocol Length | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// \ / +// | | // | Label | -// / \ +// | | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// \ / +// | | // | Protocol | -// / \ +// | | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ STATUS sctpSessionWriteDcep(PSctpSession pSctpSession, UINT32 streamId, PCHAR pChannelName, UINT32 pChannelNameLen, PRtcDataChannelInit pRtcDataChannelInit) { @@ -271,7 +271,7 @@ CleanUp: }
-INT32 onSctpOutboundPacket(PVOID addr, PVOID data, ULONG length, UINT8 tos, UINT8 set_df) +INT32 onSctpOutboundPacket(PVOID addr, PVOID data, SIZE_T length, UINT8 tos, UINT8 set_df) { UNUSED_PARAM(tos); UNUSED_PARAM(set_df); @@ -328,7 +328,7 @@ CleanUp: return retStatus; }
-INT32 onSctpInboundPacket(struct socket sock, union sctp_sockstore addr, PVOID data, ULONG length, struct sctp_rcvinfo rcv, INT32 flags, PVOID ulp_info) +INT32 onSctpInboundPacket(struct socket sock, union sctp_sockstore addr, PVOID data, SIZE_T length, struct sctp_rcvinfo rcv, INT32 flags, PVOID ulp_info) { UNUSED_PARAM(sock); UNUSED_PARAM(addr); @@ -371,5 +371,5 @@ CleanUp: free(data); }
return retStatus; } diff --git a/src/source/Sctp/Sctp.h b/src/source/Sctp/Sctp.h index 72b0752..80bb8e7 100644 --- a/src/source/Sctp/Sctp.h +++ b/src/source/Sctp/Sctp.h @@ -80,8 +80,8 @@ STATUS sctpSessionWriteMessage(PSctpSession, UINT32, BOOL, PBYTE, UINT32); STATUS sctpSessionWriteDcep(PSctpSession, UINT32, PCHAR, UINT32, PRtcDataChannelInit);
// Callbacks used by usrsctp -INT32 onSctpOutboundPacket(PVOID, PVOID, ULONG, UINT8, UINT8); -INT32 onSctpInboundPacket(struct socket, union sctp_sockstore, PVOID, ULONG, struct sctp_rcvinfo, INT32, PVOID); +INT32 onSctpOutboundPacket(PVOID, PVOID, SIZE_T, UINT8, UINT8); +INT32 onSctpInboundPacket(struct socket, union sctp_sockstore, PVOID, SIZE_T, struct sctp_rcvinfo, INT32, PVOID);
} (END) `
Put the diff here. If you think it is suitable, please take them into the consideration. thanks.
The best approach would be to push a PR so folks can contribute/comment and eventually merge into master
already detached my branch from this trunk, so just put it here to be a helper for other people may need. Closing it, thanks.
A one liner description about the use case and what you are trying to achieve some warning messages.
Any design considerations/constraints Explain in detail how you would like to integrate our SDK into your solution I am doing cross-compiling and enabled "-Werror". Some warning message showed up, and I added clang to fix it. thanks.
$ make Scanning dependencies of target kvsWebrtcClient [ 2%] Building C object CMakeFiles/kvsWebrtcClient.dir/src/source/Dtls/Dtls.c.o In file included from /home/iotlab/scofield/_workspace/-porting/kvs-webrtc-c/src/source/Dtls/../Include_i.h:27:0, from /home/iotlab/scofield/_workspace/-porting/kvs-webrtc-c/src/source/Dtls/Dtls.c:2: /home/iotlab/scofield/_workspace/****-porting/kvs-webrtc-c/src/include/com/amazonaws/kinesis/video/webrtcclient/Include.h:16:0: error: ignoring #pragma clang diagnostic [-Werror=unknown-pragmas]
pragma clang diagnostic push
/home/iotlab/scofield/_workspace/****-porting/kvs-webrtc-c/src/include/com/amazonaws/kinesis/video/webrtcclient/Include.h:17:0: error: ignoring #pragma clang diagnostic [-Werror=unknown-pragmas]
pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
In file included from /home/iotlab/scofield/_workspace/-porting/kvs-webrtc-c/src/include/com/amazonaws/kinesis/video/webrtcclient/Include.h:20:0, from /home/iotlab/scofield/_workspace/-porting/kvs-webrtc-c/src/source/Dtls/../Include_i.h:27, from /home/iotlab/scofield/_workspace/-porting/kvs-webrtc-c/src/source/Dtls/Dtls.c:2: /home/iotlab/scofield/_workspace/-porting/kvs-webrtc-c/src/include/com/amazonaws/kinesis/video/webrtcclient/NullableDefs.h:17:0: error: ignoring #pragma clang diagnostic [-Werror=unknown-pragmas]
pragma clang diagnostic push
/home/iotlab/scofield/_workspace/****-porting/kvs-webrtc-c/src/include/com/amazonaws/kinesis/video/webrtcclient/NullableDefs.h:18:0: error: ignoring #pragma clang diagnostic [-Werror=unknown-pragmas]
pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
/home/iotlab/scofield/_workspace/****-porting/kvs-webrtc-c/src/include/com/amazonaws/kinesis/video/webrtcclient/NullableDefs.h:19:0: error: ignoring #pragma clang diagnostic [-Werror=unknown-pragmas]
pragma clang diagnostic pop
In file included from /home/iotlab/scofield/_workspace/-porting/kvs-webrtc-c/src/source/Dtls/../Include_i.h:27:0, from /home/iotlab/scofield/_workspace/-porting/kvs-webrtc-c/src/source/Dtls/Dtls.c:2: /home/iotlab/scofield/_workspace/****-porting/kvs-webrtc-c/src/include/com/amazonaws/kinesis/video/webrtcclient/Include.h:23:0: error: ignoring #pragma clang diagnostic [-Werror=unknown-pragmas]
pragma clang diagnostic pop
$ git diff ../src/include/* diff --git a/src/include/com/amazonaws/kinesis/video/webrtcclient/Include.h b/src/include/com/amazonaws/kinesis/video/webrtcclient/Include.h index e7d6b2f..eeeaeaa 100644 --- a/src/include/com/amazonaws/kinesis/video/webrtcclient/Include.h +++ b/src/include/com/amazonaws/kinesis/video/webrtcclient/Include.h @@ -13,15 +13,17 @@ extern "C" { //////////////////////////////////////////////////// // Public headers //////////////////////////////////////////////////// +#ifdef clang
pragma clang diagnostic push
pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
+#endif
include <com/amazonaws/kinesis/video/client/Include.h>
include <com/amazonaws/kinesis/video/common/Include.h>
include <com/amazonaws/kinesis/video/webrtcclient/NullableDefs.h>
include <com/amazonaws/kinesis/video/webrtcclient/Stats.h>
- +#ifdef clang
pragma clang diagnostic pop
- +#endif /===========================================================================================/ /=================SESSION DESCRIPTION INIT RELATED STATUS ERROR CODES=== ===================/ /===========================================================================================/ diff --git a/src/include/com/amazonaws/kinesis/video/webrtcclient/NullableDefs.h b/src/include/com/amazonaws/kinesis/video/webrtcclient/NullableDefs.h index b180c84..bcbe963 100644 --- a/src/include/com/amazonaws/kinesis/video/webrtcclient/NullableDefs.h +++ b/src/include/com/amazonaws/kinesis/video/webrtcclient/NullableDefs.h @@ -14,10 +14,11 @@ extern "C" { //////////////////////////////////////////////////// // Public headers //////////////////////////////////////////////////// +#ifdef clang
pragma clang diagnostic push
pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
pragma clang diagnostic pop
- +#endif
define NULLABLE_SET_EMPTY(a) \
$
If you would not like to open an issue to discuss your solution in open-platform, please email your question to kinesis-video-support@amazon.com