Under Xcode 14.3 five files generate compilation warnings
lhasiuk opened this issue · 3 comments
Describe the bug
I recently upgraded Xcode to 14.3 and switched from Branch to BranchSDK 2.1.1 in Cocoapods in an Objective-C project. During compilation I receive the warning "A function declaration without a prototype is deprecated in all versions of C" for the following files: BNCLog.m, BNCPreferenceHelper.m (two instances), NSError+Branch.m, NSString+Branch.m, and UIViewController+Branch.m.
In each case the warning is about a C function declaration with an empty parameter list. These declarations need to be changed to declare "void" in their parameter list to suppress the warning.
For example, in BNCLog.m, the code reads as follows:
BNCLogLevel BNCLogDisplayLevel() {
BNCLogLevel level = bnc_LogDisplayLevel;
return level;
}
This needs to be changed to:
BNCLogLevel BNCLogDisplayLevel(void) {
BNCLogLevel level = bnc_LogDisplayLevel;
return level;
}
Steps to reproduce
- Install Xcode 14.3
- Create an Objective-C project that uses BranchSDK via Cocoapods
- Compile the project and the warnings appear
Expected behavior
The BranchSDK should compile without warnings.
SDK Version
2.1.1
XCode Version
14.3
Device
iPhone 11 Pro
OS
16.3.1
Additional Information/Context
Running macOS Ventura 13.2.1 on a 2018 MacBook Pro
@lhasiuk
Thanks for the heads up on this new warning setting. We'll update the C method signatures accordingly.
@echo-branch You're welcome! Thanks for addressing the issue.
This should be fixed in 2.1.2