Skip to content

Commit e4bcc71

Browse files
nanangizzsauwmingtrengginas
authored
Miscellaneous fix (#3750)
* 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 <ming@teluu.com> Co-authored-by: Riza Sulistyo <trengginas@users.noreply.github.com>
1 parent 33f64ba commit e4bcc71

File tree

7 files changed

+11
-4
lines changed

7 files changed

+11
-4
lines changed

pjmedia/src/pjmedia-codec/and_vid_mediacodec.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,8 @@ static pj_status_t decode_h264(pjmedia_vid_codec *codec,
17451745
buf_pos += frm_size;
17461746
}
17471747

1748+
PJ_UNUSED_ARG(frm_cnt);
1749+
17481750
return PJ_SUCCESS;
17491751
}
17501752

pjsip-apps/src/pjsua/ios/ipjsua.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@
420420
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
421421
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
422422
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
423-
CLANG_WARN_STRICT_PROTOTYPES = YES;
423+
CLANG_WARN_STRICT_PROTOTYPES = NO;
424424
CLANG_WARN_SUSPICIOUS_MOVE = YES;
425425
CLANG_WARN_UNREACHABLE_CODE = YES;
426426
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -473,7 +473,7 @@
473473
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
474474
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
475475
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
476-
CLANG_WARN_STRICT_PROTOTYPES = YES;
476+
CLANG_WARN_STRICT_PROTOTYPES = NO;
477477
CLANG_WARN_SUSPICIOUS_MOVE = YES;
478478
CLANG_WARN_UNREACHABLE_CODE = YES;
479479
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

pjsip-apps/src/samples/pjsua2_demo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class MyAudioMediaPort: public AudioMediaPort
6161

6262
virtual void onFrameReceived(MediaFrame &frame)
6363
{
64+
PJ_UNUSED_ARG(frame);
6465
// Process the incoming frame here
6566
}
6667
};

pjsip-apps/src/swig/java/android/app-kotlin/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
android:supportsRtl="true"
1616
android:theme="@style/Theme.Android">
1717
<activity android:name=".MainActivity"
18+
android:configChanges="orientation|keyboardHidden|screenSize"
1819
android:exported="true">
1920
<intent-filter>
2021
<action android:name="android.intent.action.MAIN" />

pjsip/include/pjsua2/call.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,8 @@ struct StreamInfo
678678
dir(PJMEDIA_DIR_NONE),
679679
txPt(0),
680680
rxPt(0),
681+
audTxEventPt(0),
682+
audRxEventPt(0),
681683
codecClockRate(0),
682684
jbInit(-1),
683685
jbMinPre(-1),

pjsip/src/pjsua-lib/pjsua_acc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3449,7 +3449,7 @@ pj_status_t pjsua_acc_get_uac_addr(pjsua_acc_id acc_id,
34493449

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

34543454
tp_flag = PJSIP_TRANSPORT_SECURE;
34553455
flag = pjsip_transport_get_flag_from_type(tp_type);
@@ -3869,7 +3869,7 @@ PJ_DEF(pj_status_t) pjsua_acc_create_uas_contact( pj_pool_t *pool,
38693869

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

38743874
tp_flag = PJSIP_TRANSPORT_SECURE;
38753875
flag = pjsip_transport_get_flag_from_type(tp_type);

third_party/build/srtp/srtp_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
# pragma warning(disable:4701) // potentially uninitialized local variable used
152152
# pragma warning(disable:4702) // unreachable code
153153
# pragma warning(disable:4703) // potentially uninitialized local pointer variable used
154+
# pragma warning(disable:4204) // nonstandard extension used : non-constant aggregate initializer
154155
#endif
155156

156157
/* clock() */

0 commit comments

Comments
 (0)