diff options
author | fuzzard <fuzzard@kodi.tv> | 2021-11-06 20:23:10 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2021-11-06 20:26:12 +1000 |
commit | d74e1b6a7119f58e2f8c0b77a9c7195781fea839 (patch) | |
tree | e46603b5ef34740ba57ab3423cc7355d7a95b89d /tools/EventClients/Clients | |
parent | 1fb18c82c775d0c93221a473b1c1d1d7c8bfa749 (diff) |
[tools/EventClients][OSXRemote] fix clang-analyze warning
Fix the following warning from clang-analyze
/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm:417:2: warning: Instance variable used while 'self' is not set to the result of '[(super or self) init...]'
mp_impl = new XBMCClientWrapperImpl(f_mode, [fp_server UTF8String], f_port, f_verbose);
^~~~~~~
1 warning generated.
Diffstat (limited to 'tools/EventClients/Clients')
-rw-r--r-- | tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm b/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm index 643725f12a..06c383e707 100644 --- a/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm +++ b/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm @@ -412,10 +412,11 @@ void XBMCClientWrapperImpl::populateMultiRemoteModeMap(){ return [self initWithMode:DEFAULT_MODE serverAddress:@"localhost" port:9777 verbose: false]; } - (id) initWithMode:(eRemoteMode) f_mode serverAddress:(NSString*) fp_server port:(int) f_port verbose:(bool) f_verbose{ - if( ![super init] ) - return nil; - mp_impl = new XBMCClientWrapperImpl(f_mode, [fp_server UTF8String], f_port, f_verbose); - return self; + self = [super init]; + if (self) + mp_impl = new XBMCClientWrapperImpl(f_mode, [fp_server UTF8String], f_port, f_verbose); + + return self; } - (void) setUniversalModeTimeout:(double) f_timeout{ |