| 1 |
Description: Fix some legitimate GCC warnings. |
| 2 |
cast to pointer from integer of different size |
| 3 |
passing argument N of ‘foo’ from incompatible pointer type |
| 4 |
the address of 'foo' will always evaluate as 'true' |
| 5 |
Bug-Debian: https://bugs.debian.org/749762 |
| 6 |
Forwarded: https://savannah.nongnu.org/bugs/?54123 |
| 7 |
Author: Yavor Doganov <[email protected]> |
| 8 |
Last-Update: 2023-02-27 |
| 9 |
--- |
| 10 |
|
| 11 |
--- pantomime.orig/Framework/Pantomime/CWIMAPCacheManager.m |
| 12 |
+++ pantomime/Framework/Pantomime/CWIMAPCacheManager.m |
| 13 |
@@ -364,7 +364,7 @@ |
| 14 |
write_data(_fd, theRecord->to); |
| 15 |
write_data(_fd, theRecord->cc); |
| 16 |
|
| 17 |
|
| 18 |
+ NSMapInsert(_table, (void *)(intptr_t)theRecord->imap_uid, theMessage); |
| 19 |
_count++; |
| 20 |
} |
| 21 |
|
| 22 |
--- pantomime.orig/Framework/Pantomime/CWService.m |
| 23 |
+++ pantomime/Framework/Pantomime/CWService.m |
| 24 |
@@ -558,7 +558,7 @@ |
| 25 |
// If we are done writing, let's remove the watcher on our fd. |
| 26 |
for (i = 0; i < [_runLoopModes count]; i++) |
| 27 |
{ |
| 28 |
|
| 29 |
+ [[NSRunLoop currentRunLoop] removeEvent: (void *)(intptr_t)[_connection fd] |
| 30 |
type: ET_WDESC |
| 31 |
forMode: [_runLoopModes objectAtIndex: i] |
| 32 |
all: YES]; |
| 33 |
@@ -622,7 +622,7 @@ |
| 34 |
#ifndef __MINGW32__ |
| 35 |
for (i = 0; i < [_runLoopModes count]; i++) |
| 36 |
{ |
| 37 |
|
| 38 |
+ [[NSRunLoop currentRunLoop] addEvent: (void *)(intptr_t)[_connection fd] |
| 39 |
type: ET_WDESC |
| 40 |
watcher: self |
| 41 |
forMode: [_runLoopModes objectAtIndex: i]]; |
| 42 |
@@ -812,7 +812,7 @@ |
| 43 |
|
| 44 |
for (i = 0; i < [_runLoopModes count]; i++) |
| 45 |
{ |
| 46 |
|
| 47 |
+ [[NSRunLoop currentRunLoop] addEvent: (void *)(intptr_t)[_connection fd] |
| 48 |
#ifdef __MINGW32__ |
| 49 |
type: ET_HANDLE |
| 50 |
#else |
| 51 |
@@ -821,7 +821,7 @@ |
| 52 |
watcher: self |
| 53 |
forMode: [_runLoopModes objectAtIndex: i]]; |
| 54 |
|
| 55 |
|
| 56 |
+ [[NSRunLoop currentRunLoop] addEvent: (void *)(intptr_t)[_connection fd] |
| 57 |
#ifdef __MINGW32__ |
| 58 |
type: ET_TRIGGER |
| 59 |
#else |
| 60 |
@@ -878,17 +878,17 @@ |
| 61 |
forMode: [_runLoopModes objectAtIndex: i] |
| 62 |
all: YES]; |
| 63 |
#else |
| 64 |
|
| 65 |
+ [[NSRunLoop currentRunLoop] removeEvent: (void *)(intptr_t)[_connection fd] |
| 66 |
type: ET_RDESC |
| 67 |
forMode: [_runLoopModes objectAtIndex: i] |
| 68 |
all: YES]; |
| 69 |
|
| 70 |
|
| 71 |
+ [[NSRunLoop currentRunLoop] removeEvent: (void *)(intptr_t)[_connection fd] |
| 72 |
type: ET_WDESC |
| 73 |
forMode: [_runLoopModes objectAtIndex: i] |
| 74 |
all: YES]; |
| 75 |
|
| 76 |
|
| 77 |
+ [[NSRunLoop currentRunLoop] removeEvent: (void *)(intptr_t)[_connection fd] |
| 78 |
type: ET_EDESC |
| 79 |
forMode: [_runLoopModes objectAtIndex: i] |
| 80 |
all: YES]; |
| 81 |
--- pantomime.orig/Framework/Pantomime/CWConstants.h |
| 82 |
+++ pantomime/Framework/Pantomime/CWConstants.h |
| 83 |
@@ -141,14 +141,14 @@ |
| 84 |
} |
| 85 |
|
| 86 |
#define AUTHENTICATION_COMPLETED(del, s) \ |
| 87 |
|
| 88 |
|
| 89 |
+POST_NOTIFICATION(PantomimeAuthenticationCompleted, self, [NSDictionary dictionaryWithObject: ((id)s != nil ?(id)s:(id)@"") forKey: @"Mechanism"]); \ |
| 90 |
+PERFORM_SELECTOR_2(del, @selector(authenticationCompleted:), PantomimeAuthenticationCompleted, ((id)s != nil ?(id)s:(id)@""), @"Mechanism"); |
| 91 |
|
| 92 |
|
| 93 |
#define AUTHENTICATION_FAILED(del, s) \ |
| 94 |
NSLog(@"AUTHENTICATION_FAILED: |%@|", s); \ |
| 95 |
|
| 96 |
|
| 97 |
+POST_NOTIFICATION(PantomimeAuthenticationFailed, self, [NSDictionary dictionaryWithObject: ((id)s != nil ?(id)s:(id)@"") forKey: @"Mechanism"]); \ |
| 98 |
+PERFORM_SELECTOR_2(del, @selector(authenticationFailed:), PantomimeAuthenticationFailed, ((id)s != nil ?(id)s:(id)@""), @"Mechanism"); |
| 99 |
|
| 100 |
#define POST_NOTIFICATION(name, obj, info) \ |
| 101 |
[[NSNotificationCenter defaultCenter] postNotificationName: name \ |
| 102 |
--- pantomime.orig/Framework/Pantomime/CWPOP3CacheManager.m |
| 103 |
+++ pantomime/Framework/Pantomime/CWPOP3CacheManager.m |
| 104 |
@@ -103,7 +103,7 @@ |
| 105 |
return self; |
| 106 |
} |
| 107 |
|
| 108 |
|
| 109 |
+ if(read_uint32(_fd, (uint32_t *)&_count) <= 0) |
| 110 |
{ |
| 111 |
NSLog(@"CWPOP3CacheManager initWithPath: error reading count"); |
| 112 |
} |