From 2a56fa200ef4c7c44e053c92ffe4ec8125140ce7 Mon Sep 17 00:00:00 2001 From: Sergei Ilinykh Date: Tue, 23 Apr 2024 18:27:52 +0300 Subject: [PATCH] fixed compilation warnings --- src/irisnet/noncore/sctp/SctpAssociation.cpp | 4 ++-- src/irisnet/noncore/sctp/SctpAssociation.hpp | 2 +- src/xmpp/xmpp-im/jingle-sctp-association_p.cpp | 2 +- src/xmpp/xmpp-im/jingle-sctp-association_p.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/irisnet/noncore/sctp/SctpAssociation.cpp b/src/irisnet/noncore/sctp/SctpAssociation.cpp index eade02d3..ba9aebf3 100644 --- a/src/irisnet/noncore/sctp/SctpAssociation.cpp +++ b/src/irisnet/noncore/sctp/SctpAssociation.cpp @@ -789,8 +789,8 @@ void SctpAssociation::OnUsrSctpReceiveSctpNotification(union sctp_notification * case SCTP_STREAM_RESET_EVENT: { bool incoming { false }; bool outgoing { false }; - uint16_t numStreams = (notification->sn_strreset_event.strreset_length - sizeof(struct sctp_stream_reset_event)) - / sizeof(uint16_t); + uint16_t numStreams = uint16_t((notification->sn_strreset_event.strreset_length - sizeof(struct sctp_stream_reset_event)) + / sizeof(uint16_t)); if (notification->sn_strreset_event.strreset_flags & SCTP_STREAM_RESET_INCOMING_SSN) incoming = true; diff --git a/src/irisnet/noncore/sctp/SctpAssociation.hpp b/src/irisnet/noncore/sctp/SctpAssociation.hpp index 1e371f6a..70fd5405 100644 --- a/src/irisnet/noncore/sctp/SctpAssociation.hpp +++ b/src/irisnet/noncore/sctp/SctpAssociation.hpp @@ -36,7 +36,7 @@ class SctpAssociation { virtual void OnSctpAssociationMessageReceived(RTC::SctpAssociation *sctpAssociation, uint16_t streamId, uint32_t ppid, const uint8_t *msg, size_t len) = 0; - virtual void OnSctpAssociationBufferedAmount(RTC::SctpAssociation *sctpAssociation, uint32_t len) = 0; + virtual void OnSctpAssociationBufferedAmount(RTC::SctpAssociation *sctpAssociation, size_t len) = 0; virtual void OnSctpStreamClosed(RTC::SctpAssociation *sctpAssociation, uint16_t streamId) = 0; }; diff --git a/src/xmpp/xmpp-im/jingle-sctp-association_p.cpp b/src/xmpp/xmpp-im/jingle-sctp-association_p.cpp index bc7a3eae..663aa122 100644 --- a/src/xmpp/xmpp-im/jingle-sctp-association_p.cpp +++ b/src/xmpp/xmpp-im/jingle-sctp-association_p.cpp @@ -96,7 +96,7 @@ namespace XMPP { namespace Jingle { namespace SCTP { * @param sctpAssociation * @param len - number of bytes currently buffered in usrsctp. not more than MAX_SEND_BUFFER_SIZE */ - void AssociationPrivate::OnSctpAssociationBufferedAmount(RTC::SctpAssociation *sctpAssociation, uint32_t len) + void AssociationPrivate::OnSctpAssociationBufferedAmount(RTC::SctpAssociation *sctpAssociation, size_t len) { // qDebug("jignle-sctp: on buffered data: %d", len); Q_UNUSED(sctpAssociation); diff --git a/src/xmpp/xmpp-im/jingle-sctp-association_p.h b/src/xmpp/xmpp-im/jingle-sctp-association_p.h index 312e715c..96091471 100644 --- a/src/xmpp/xmpp-im/jingle-sctp-association_p.h +++ b/src/xmpp/xmpp-im/jingle-sctp-association_p.h @@ -73,7 +73,7 @@ namespace XMPP { namespace Jingle { namespace SCTP { void OnSctpAssociationSendData(RTC::SctpAssociation *, const uint8_t *data, size_t len) override; void OnSctpAssociationMessageReceived(RTC::SctpAssociation *, uint16_t streamId, uint32_t ppid, const uint8_t *msg, size_t len) override; - void OnSctpAssociationBufferedAmount(RTC::SctpAssociation *sctpAssociation, uint32_t len) override; + void OnSctpAssociationBufferedAmount(RTC::SctpAssociation *sctpAssociation, size_t len) override; void OnSctpStreamClosed(RTC::SctpAssociation *sctpAssociation, uint16_t streamId) override; void handleIncomingDataChannelOpen(const QByteArray &data, quint16 streamId);