Package: gworkspace / 0.9.4-1

incompatible-pointer-types.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Description: Fix incompatible-pointer-types compiler warning.
Author: Yavor Doganov <yavor@gnu.org>
Forwarded: https://savannah.gnu.org/bugs/?52729
Last-Update: 2017-12-22
---

--- gworkspace.orig/FSNode/FSNFunctions.m
+++ gworkspace/FSNode/FSNFunctions.m
@@ -73,7 +73,7 @@
 	return path_separator();
 }
 
-int compareWithExtType(id *r1, id *r2, void *context)
+NSComparisonResult compareWithExtType(id *r1, id *r2, void *context)
 {
   FSNInfoType t1 = [(id <FSNodeRep>)r1 nodeInfoShowType];
   FSNInfoType t2 = [(id <FSNodeRep>)r2 nodeInfoShowType];
--- gworkspace.orig/FSNode/FSNIconsView.m
+++ gworkspace/FSNode/FSNIconsView.m
@@ -198,7 +198,7 @@
 - (void)sortIcons
 {
   if (infoType == FSNInfoExtendedType) {
-    [icons sortUsingFunction: (int (*)(id, id, void*))compareWithExtType
+    [icons sortUsingFunction: (NSComparisonResult (*)(id, id, void*))compareWithExtType
                      context: (void *)NULL];
   } else {
     [icons sortUsingSelector: [fsnodeRep compareSelectorForDirectory: [node path]]];
--- gworkspace.orig/FSNode/FSNListView.m
+++ gworkspace/FSNode/FSNListView.m
@@ -277,7 +277,7 @@
     [nodeReps sortUsingSelector: sortingSel];
 
   } else {
-    [nodeReps sortUsingFunction: (int (*)(id, id, void*))compareWithExtType
+    [nodeReps sortUsingFunction: (NSComparisonResult (*)(id, id, void*))compareWithExtType
                         context: (void *)NULL];
   }
 
@@ -2339,7 +2339,7 @@
 
 @implementation FSNListViewNameEditor
 
-int sortSubviews(id view1, id view2, void *context)
+NSComparisonResult sortSubviews(id view1, id view2, void *context)
 {
   if ([view1 isMemberOfClass: [FSNListViewNameEditor class]]) {
     return NSOrderedAscending;
@@ -2387,7 +2387,7 @@
     [super mouseDown: theEvent];
   }
 
-  [view sortSubviewsUsingFunction: (int (*)(id, id, void *))sortSubviews context: nil];  
+  [view sortSubviewsUsingFunction: (NSComparisonResult (*)(id, id, void *))sortSubviews context: nil];
   [view setNeedsDisplayInRect: [self frame]];
 }
 
--- gworkspace.orig/GWorkspace/Desktop/GWDesktopView.m
+++ gworkspace/GWorkspace/Desktop/GWDesktopView.m
@@ -1693,7 +1693,7 @@
 	return YES;
 }
 
-int sortDragged(id icn1, id icn2, void *context)
+NSComparisonResult sortDragged(id icn1, id icn2, void *context)
 {
   NSArray *indexes = (NSArray *)context;
   int pos1 = [icn1 gridIndex];
@@ -1778,7 +1778,7 @@
       firstinrow++;
     }
 
-    sorted = [removed sortedArrayUsingFunction: (int (*)(id, id, void *))sortDragged 
+    sorted = [removed sortedArrayUsingFunction: (NSComparisonResult (*)(id, id, void *))sortDragged
                                        context: (void *)sortIndexes];
 
     for (i = 0; i < [sorted count]; i++) {
--- gworkspace.orig/FSNode/FSNFunctions.h
+++ gworkspace/FSNode/FSNFunctions.h
@@ -32,7 +32,7 @@
 
 NSString *subtractFirstPartFromPath(NSString *path, NSString *firstpart);
 
-int compareWithExtType(id *r1, id *r2, void *context);
+NSComparisonResult compareWithExtType(id *r1, id *r2, void *context);
 
 NSString *sizeDescription(unsigned long long size);