awslabs / amazon-kinesis-video-streams-webrtc-sdk-c

Amazon Kinesis Video Streams Webrtc SDK is for developers to install and customize realtime communication between devices and enable secure streaming of video, audio to Kinesis Video Streams.
https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-c/group__PublicMemberFunctions.html
Apache License 2.0
1.04k stars 316 forks source link

[QUESTION] some warning messages #639

Closed ycyang1229 closed 4 years ago

ycyang1229 commented 4 years ago

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) \

 do { \
     (a).isNull = TRUE; \

$

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

ycyang1229 commented 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; }

-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); }

ycyang1229 commented 4 years ago

Put the diff here. If you think it is suitable, please take them into the consideration. thanks.

MushMal commented 4 years ago

The best approach would be to push a PR so folks can contribute/comment and eventually merge into master

ycyang1229 commented 4 years ago

already detached my branch from this trunk, so just put it here to be a helper for other people may need. Closing it, thanks.