Fixing warnings in public iOS SDK headers.

Building with the newly published cocoapod generated a few warnings,
which looked a bit bad.

Bug: webrtc:8831
Change-Id: I70c06930603b328e4d11c599a5b5dd77b45150c6
Reviewed-on: https://webrtc-review.googlesource.com/46163
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21846}
This commit is contained in:
Peter Hanspers 2018-02-01 13:33:18 +01:00 committed by Commit Bot
parent 56fa050125
commit 28dbf97242
8 changed files with 17 additions and 16 deletions

View File

@ -168,7 +168,7 @@ const int64_t kNanosecondsPerSecond = 1000000000;
}];
}
- (void)stopCaptureWithCompletionHandler:(nullable void (^)())completionHandler {
- (void)stopCaptureWithCompletionHandler:(nullable void (^)(void))completionHandler {
_willBeRunning = NO;
[RTCDispatcher
dispatchAsyncOnType:RTCDispatcherTypeCaptureSession

View File

@ -12,11 +12,11 @@
#import "RTCMetricsSampleInfo+Private.h"
void RTCEnableMetrics() {
void RTCEnableMetrics(void) {
webrtc::metrics::Enable();
}
NSArray<RTCMetricsSampleInfo *> *RTCGetAndResetMetrics() {
NSArray<RTCMetricsSampleInfo *> *RTCGetAndResetMetrics(void) {
std::map<std::string, std::unique_ptr<webrtc::metrics::SampleInfo>>
histograms;
webrtc::metrics::GetAndReset(&histograms);

View File

@ -13,13 +13,13 @@
#include "rtc_base/checks.h"
#include "rtc_base/ssladapter.h"
BOOL RTCInitializeSSL() {
BOOL RTCInitializeSSL(void) {
BOOL initialized = rtc::InitializeSSL();
RTC_DCHECK(initialized);
return initialized;
}
BOOL RTCCleanupSSL() {
BOOL RTCCleanupSSL(void) {
BOOL cleanedUp = rtc::CleanupSSL();
RTC_DCHECK(cleanedUp);
return cleanedUp;

View File

@ -12,7 +12,7 @@
#include "rtc_base/event_tracer.h"
void RTCSetupInternalTracer() {
void RTCSetupInternalTracer(void) {
rtc::tracing::SetupInternalTracer();
}
@ -20,10 +20,10 @@ BOOL RTCStartInternalCapture(NSString *filePath) {
return rtc::tracing::StartInternalCapture(filePath.UTF8String);
}
void RTCStopInternalCapture() {
void RTCStopInternalCapture(void) {
rtc::tracing::StopInternalCapture();
}
void RTCShutdownInternalTracer() {
void RTCShutdownInternalTracer(void) {
rtc::tracing::ShutdownInternalTracer();
}

View File

@ -41,7 +41,7 @@ RTC_EXPORT
fps:(NSInteger)fps
completionHandler:(nullable void (^)(NSError *))completionHandler;
// Stops the capture session asynchronously and notifies callback on completion.
- (void)stopCaptureWithCompletionHandler:(nullable void (^)())completionHandler;
- (void)stopCaptureWithCompletionHandler:(nullable void (^)(void))completionHandler;
// Starts the capture session asynchronously.
- (void)startCaptureWithDevice:(AVCaptureDevice *)device

View File

@ -17,7 +17,8 @@
* Enables gathering of metrics (which can be fetched with
* RTCGetAndResetMetrics). Must be called before any other call into WebRTC.
*/
RTC_EXTERN void RTCEnableMetrics();
RTC_EXTERN void RTCEnableMetrics(void);
/** Gets and clears native histograms. */
RTC_EXTERN NSArray<RTCMetricsSampleInfo *> *RTCGetAndResetMetrics();
RTC_EXTERN NSArray<RTCMetricsSampleInfo *> *RTCGetAndResetMetrics(void);

View File

@ -16,5 +16,5 @@
* Initialize and clean up the SSL library. Failure is fatal. These call the
* corresponding functions in webrtc/rtc_base/ssladapter.h.
*/
RTC_EXTERN BOOL RTCInitializeSSL();
RTC_EXTERN BOOL RTCCleanupSSL();
RTC_EXTERN BOOL RTCInitializeSSL(void);
RTC_EXTERN BOOL RTCCleanupSSL(void);

View File

@ -12,10 +12,10 @@
#import <WebRTC/RTCMacros.h>
RTC_EXTERN void RTCSetupInternalTracer();
RTC_EXTERN void RTCSetupInternalTracer(void);
/** Starts capture to specified file. Must be a valid writable path.
* Returns YES if capture starts.
*/
RTC_EXTERN BOOL RTCStartInternalCapture(NSString *filePath);
RTC_EXTERN void RTCStopInternalCapture();
RTC_EXTERN void RTCShutdownInternalTracer();
RTC_EXTERN void RTCStopInternalCapture(void);
RTC_EXTERN void RTCShutdownInternalTracer(void);