瀏覽代碼

fix a couple of compilation warnings

Felix Paul Kühne 9 年之前
父節點
當前提交
07b4529c1a

+ 0 - 1
Headers/Public/VLCExtension.h

@@ -22,7 +22,6 @@
 
 #import <Cocoa/Cocoa.h>
 
-
 @interface VLCExtension : NSObject
 
 - (instancetype)initWithInstance:(struct extension_t *)instance NS_DESIGNATED_INITIALIZER; // FIXME: Should be internal

+ 1 - 1
Headers/Public/VLCMediaList.h

@@ -126,7 +126,7 @@ extern NSString *const VLCMediaListItemDeleted;
 /**
  * delegate property to listen to addition/removal events
  */
-@property (weak) id delegate;
+@property (weak, nonatomic) id delegate;
 
 /**
  * read-only property to check if the media list is writable or not

+ 1 - 1
Headers/Public/VLCMediaPlayer.h

@@ -119,7 +119,7 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
 @interface VLCMediaPlayer : NSObject
 
 @property (nonatomic, readonly) VLCLibrary *libraryInstance;
-@property (weak) id<VLCMediaPlayerDelegate> delegate;
+@property (weak, nonatomic) id<VLCMediaPlayerDelegate> delegate;
 
 #if !TARGET_OS_IPHONE
 /* Initializers */

+ 6 - 6
Headers/Public/VLCMediaThumbnailer.h

@@ -35,9 +35,9 @@
 + (VLCMediaThumbnailer *)thumbnailerWithMedia:(VLCMedia *)media delegate:(id<VLCMediaThumbnailerDelegate>)delegate andVLCLibrary:(VLCLibrary *)library;
 - (void)fetchThumbnail;
 
-@property (readwrite, weak) id<VLCMediaThumbnailerDelegate> delegate;
-@property (readwrite) VLCMedia *media;
-@property (readwrite, assign) CGImageRef thumbnail;
+@property (readwrite, weak, nonatomic) id<VLCMediaThumbnailerDelegate> delegate;
+@property (readwrite, nonatomic) VLCMedia *media;
+@property (readwrite, assign, nonatomic) CGImageRef thumbnail;
 @property (readwrite) void * libVLCinstance;
 
 /**
@@ -46,7 +46,7 @@
  * has been called.
  * @return thumbnail height. Default value 240.
  */
-@property (readwrite, assign) CGFloat thumbnailHeight;
+@property (readwrite, assign, nonatomic) CGFloat thumbnailHeight;
 
 /**
  * Thumbnail Width
@@ -54,7 +54,7 @@
  * has been called.
  * @return thumbnail height. Default value 320
  */
-@property (readwrite, assign) CGFloat thumbnailWidth;
+@property (readwrite, assign, nonatomic) CGFloat thumbnailWidth;
 
 /**
  * Snapshot Position
@@ -62,7 +62,7 @@
  * has been called.
  * @return snapshot position. Default value 0.5
  */
-@property (readwrite, assign) float snapshotPosition;
+@property (readwrite, assign, nonatomic) float snapshotPosition;
 @end
 
 @protocol VLCMediaThumbnailerDelegate

+ 3 - 1
Sources/VLCLibrary.m

@@ -201,12 +201,14 @@ static void HandleMessage(void *data,
     if (vasprintf(&str, fmt, args) == -1) {
         if (str)
             free(str);
+        str = NULL;
         return;
     }
 
     if (str == NULL)
         return;
 
-    VKLog(@"%@", [NSString stringWithUTF8String:str]);
+    VKLog(@"%s", str);
     free(str);
+    str = NULL;
 }

+ 2 - 2
Sources/VLCMediaThumbnailer.m

@@ -48,8 +48,8 @@
 - (void)notifyDelegate;
 - (void)fetchThumbnail;
 - (void)startFetchingThumbnail;
-@property (readonly, assign) void *dataPointer;
-@property (readonly, assign) BOOL shouldRejectFrames;
+@property (readonly, assign, nonatomic) void *dataPointer;
+@property (readonly, assign, nonatomic) BOOL shouldRejectFrames;
 @end
 
 static void *lock(void *opaque, void **pixels)