[vlc-commits] [Git][videolan/vlc][master] 6 commits: macosx: Fix compile warnings in VLCLbraryCollectionViewFlowLayout

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sat Nov 22 07:50:03 UTC 2025



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
6bf4b940 by Claudio Cambra at 2025-11-22T08:27:44+01:00
macosx: Fix compile warnings in VLCLbraryCollectionViewFlowLayout

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
04fbb0da by Claudio Cambra at 2025-11-22T08:27:44+01:00
macosx: Fix compile warnings in VLCLibraryAlbumTableCellView

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
e2a8f719 by Claudio Cambra at 2025-11-22T08:27:44+01:00
macosx: Fix compile warnings in VLCLibraryAudioViewController

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
2a8cd6c1 by Claudio Cambra at 2025-11-22T08:27:44+01:00
macosx: Fix compile warnings in VLCMain

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
f16cf314 by Claudio Cambra at 2025-11-22T08:27:44+01:00
macosx: Fix compile warnings in VLCMainMenu

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
0b2f6fef by Claudio Cambra at 2025-11-22T08:27:44+01:00
macosx: Check for numberOfAudioDevices below 0

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


5 changed files:

- modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
- modules/gui/macosx/library/audio-library/VLCLibraryAlbumTableCellView.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m
- modules/gui/macosx/main/VLCMain.m
- modules/gui/macosx/menus/VLCMainMenu.m


Changes:

=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
=====================================
@@ -120,7 +120,7 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink,
     NSMutableArray *generatedAnimationSteps = [NSMutableArray arrayWithCapacity:kAnimationSteps];
 
     // Easing out cubic
-    for(int i = 0; i < kAnimationSteps; ++i) {
+    for(NSUInteger i = 0; i < kAnimationSteps; ++i) {
         CGFloat progress = (CGFloat)i  / (CGFloat)kAnimationSteps;
         progress -= 1;
         generatedAnimationSteps[i] = @(dimension * (progress * progress * progress + 1) + kDetailViewCollapsedHeight);
@@ -291,12 +291,10 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink,
         return [super layoutAttributesForElementsInRect:rect];
     }
 
-    NSRect selectedItemFrame = [[self layoutAttributesForItemAtIndexPath:_selectedIndexPath] frame];
-
     // Computed attributes from parent
     NSMutableArray<__kindof NSCollectionViewLayoutAttributes *> * const layoutAttributesArray =
         [super layoutAttributesForElementsInRect:rect].mutableCopy;
-    for (int i = 0; i < layoutAttributesArray.count; i++) {
+    for (NSUInteger i = 0; i < layoutAttributesArray.count; i++) {
         NSCollectionViewLayoutAttributes * const attributes = layoutAttributesArray[i].copy;
         NSString * const elementKind = attributes.representedElementKind;
 
@@ -470,11 +468,11 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink,
 @end
 
 static CVReturn detailViewAnimationCallback(
-                                            CVDisplayLinkRef displayLink,
-                                            const CVTimeStamp *inNow,
-                                            const CVTimeStamp *inOutputTime,
-                                            CVOptionFlags flagsIn,
-                                            CVOptionFlags *flagsOut,
+                                            CVDisplayLinkRef displayLink __unused,
+                                            const CVTimeStamp *inNow __unused,
+                                            const CVTimeStamp *inOutputTime __unused,
+                                            CVOptionFlags flagsIn __unused,
+                                            CVOptionFlags *flagsOut __unused,
                                             void *displayLinkContext)
 {
     if (displayLinkContext == nil) {


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAlbumTableCellView.m
=====================================
@@ -394,7 +394,7 @@ const CGFloat VLCLibraryAlbumTableCellViewDefaultHeight = 168.;
     NSArray * const tracks = album.mediaItems;
     const NSUInteger trackCount = tracks.count;
     const NSInteger clickedRow = _tracksTableView.clickedRow;
-    if (clickedRow >= 0 && clickedRow < trackCount) {
+    if (clickedRow >= 0 && (NSUInteger)clickedRow < trackCount) {
         VLCMediaLibraryMediaItem * const mediaItem = tracks[clickedRow];
         VLCLibraryRepresentedItem * const representedItem = [[VLCLibraryRepresentedItem alloc] initWithItem:mediaItem parentType:VLCMediaLibraryParentGroupTypeAlbum];
 


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m
=====================================
@@ -471,7 +471,7 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
 
 - (void)presentLibraryItemWaitForDataSourceFinished:(nullable NSNotification *)aNotification
 {
-    if (self.audioDataSource.displayedCollectionCount < self.audioDataSource.collectionToDisplayCount) {
+    if ((NSUInteger)self.audioDataSource.displayedCollectionCount < self.audioDataSource.collectionToDisplayCount) {
         return;
     }
     


=====================================
modules/gui/macosx/main/VLCMain.m
=====================================
@@ -243,7 +243,7 @@ void CloseIntf (vlc_object_t *p_this)
 
 static VLCMain *sharedInstance = nil;
 
-+ (VLCMain *)sharedInstance;
++ (VLCMain *)sharedInstance
 {
     static dispatch_once_t pred;
     dispatch_once(&pred, ^{


=====================================
modules/gui/macosx/menus/VLCMainMenu.m
=====================================
@@ -1105,7 +1105,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
         return;
 
     int numberOfAudioDevices = aout_DevicesList(p_aout, &ids, &names);
-    if (numberOfAudioDevices == -1) {
+    if (numberOfAudioDevices < 0) {
         aout_Release(p_aout);
         return;
     }
@@ -1113,7 +1113,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
     currentDevice = aout_DeviceGet(p_aout);
     NSMenuItem *_tmp;
 
-    for (NSUInteger x = 0; x < numberOfAudioDevices; x++) {
+    for (NSUInteger x = 0; x < (NSUInteger)numberOfAudioDevices; x++) {
         _tmp = [_audioDeviceMenu addItemWithTitle:toNSStr(names[x]) action:@selector(toggleAudioDevice:) keyEquivalent:@""];
         [_tmp setTarget:self];
         [_tmp setTag:[[NSString stringWithFormat:@"%s", ids[x]] intValue]];
@@ -1124,7 +1124,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
 
     free(currentDevice);
 
-    for (NSUInteger x = 0; x < numberOfAudioDevices; x++) {
+    for (NSUInteger x = 0; x < (NSUInteger)numberOfAudioDevices; x++) {
         free(ids[x]);
         free(names[x]);
     }
@@ -1210,7 +1210,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
 {
     // FIXME re-write using VLCPlayerController
     NSInteger count = [_postprocessingMenu numberOfItems];
-    for (NSUInteger x = 0; x < count; x++)
+    for (NSUInteger x = 0; x < (NSUInteger)count; x++)
         [[_postprocessingMenu itemAtIndex:x] setState:NSOffState];
 
     if ([sender tag] == -1) {
@@ -2021,7 +2021,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
                             ofObject:(vlc_object_t *)object
                       withObjectType:(VLCObjectType)objectType
                             andValue:(vlc_value_t)value
-                      ofVariableType:(int)type;
+                      ofVariableType:(int)type
 {
     self = [super init];
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f46a07c976b5a1023eef27ba321779079fb5dfe5...0b2f6feffc77f202389bd50654df65fb7bca45e6

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f46a07c976b5a1023eef27ba321779079fb5dfe5...0b2f6feffc77f202389bd50654df65fb7bca45e6
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list