Skip to content

Commit

Permalink
Miscellaneous fix (#3750)
Browse files Browse the repository at this point in the history
* Fix various compile warnings (on MSVC2005 and Android)

* A function declaration without a prototype is deprecated in all versions of C

* Fix build warning on VS2022

* Minor update on sample app pjsua2 for Android Kotlin: add param to avoid activity recreation in activity config changes, useful in maintaining video window sizes on orientation change.

---------

Co-authored-by: sauwming <[email protected]>
Co-authored-by: Riza Sulistyo <[email protected]>
  • Loading branch information
3 people authored Nov 1, 2023
1 parent 33f64ba commit e4bcc71
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions pjmedia/src/pjmedia-codec/and_vid_mediacodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1745,6 +1745,8 @@ static pj_status_t decode_h264(pjmedia_vid_codec *codec,
buf_pos += frm_size;
}

PJ_UNUSED_ARG(frm_cnt);

return PJ_SUCCESS;
}

Expand Down
4 changes: 2 additions & 2 deletions pjsip-apps/src/pjsua/ios/ipjsua.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_STRICT_PROTOTYPES = NO;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -473,7 +473,7 @@
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_STRICT_PROTOTYPES = NO;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down
1 change: 1 addition & 0 deletions pjsip-apps/src/samples/pjsua2_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class MyAudioMediaPort: public AudioMediaPort

virtual void onFrameReceived(MediaFrame &frame)
{
PJ_UNUSED_ARG(frame);
// Process the incoming frame here
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
android:supportsRtl="true"
android:theme="@style/Theme.Android">
<activity android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
2 changes: 2 additions & 0 deletions pjsip/include/pjsua2/call.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,8 @@ struct StreamInfo
dir(PJMEDIA_DIR_NONE),
txPt(0),
rxPt(0),
audTxEventPt(0),
audRxEventPt(0),
codecClockRate(0),
jbInit(-1),
jbMinPre(-1),
Expand Down
4 changes: 2 additions & 2 deletions pjsip/src/pjsua-lib/pjsua_acc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3449,7 +3449,7 @@ pj_status_t pjsua_acc_get_uac_addr(pjsua_acc_id acc_id,

/* If the URI uses sips scheme, make sure we use secure transport. */
if (PJSIP_URI_SCHEME_IS_SIPS(sip_uri)) {
unsigned flag, tp_flag;
unsigned tp_flag;

tp_flag = PJSIP_TRANSPORT_SECURE;
flag = pjsip_transport_get_flag_from_type(tp_type);
Expand Down Expand Up @@ -3869,7 +3869,7 @@ PJ_DEF(pj_status_t) pjsua_acc_create_uas_contact( pj_pool_t *pool,

/* If the URI uses sips scheme, make sure we use secure transport. */
if (PJSIP_URI_SCHEME_IS_SIPS(sip_uri)) {
unsigned flag, tp_flag;
unsigned tp_flag;

tp_flag = PJSIP_TRANSPORT_SECURE;
flag = pjsip_transport_get_flag_from_type(tp_type);
Expand Down
1 change: 1 addition & 0 deletions third_party/build/srtp/srtp_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
# pragma warning(disable:4701) // potentially uninitialized local variable used
# pragma warning(disable:4702) // unreachable code
# pragma warning(disable:4703) // potentially uninitialized local pointer variable used
# pragma warning(disable:4204) // nonstandard extension used : non-constant aggregate initializer
#endif

/* clock() */
Expand Down

0 comments on commit e4bcc71

Please sign in to comment.