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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
Description: Fix some legitimate GCC warnings.
cast to pointer from integer of different size
passing argument N of ‘foo’ from incompatible pointer type
the address of 'foo' will always evaluate as 'true'
Bug-Debian: https://bugs.debian.org/749762
Forwarded: https://savannah.nongnu.org/bugs/?54123
Author: Yavor Doganov <yavor@gnu.org>
Last-Update: 2023-02-27
---
--- pantomime.orig/Framework/Pantomime/CWIMAPCacheManager.m
+++ pantomime/Framework/Pantomime/CWIMAPCacheManager.m
@@ -364,7 +364,7 @@
write_data(_fd, theRecord->to);
write_data(_fd, theRecord->cc);
- NSMapInsert(_table, (void *)theRecord->imap_uid, theMessage);
+ NSMapInsert(_table, (void *)(intptr_t)theRecord->imap_uid, theMessage);
_count++;
}
--- pantomime.orig/Framework/Pantomime/CWService.m
+++ pantomime/Framework/Pantomime/CWService.m
@@ -558,7 +558,7 @@
// If we are done writing, let's remove the watcher on our fd.
for (i = 0; i < [_runLoopModes count]; i++)
{
- [[NSRunLoop currentRunLoop] removeEvent: (void *)[_connection fd]
+ [[NSRunLoop currentRunLoop] removeEvent: (void *)(intptr_t)[_connection fd]
type: ET_WDESC
forMode: [_runLoopModes objectAtIndex: i]
all: YES];
@@ -622,7 +622,7 @@
#ifndef __MINGW32__
for (i = 0; i < [_runLoopModes count]; i++)
{
- [[NSRunLoop currentRunLoop] addEvent: (void *)[_connection fd]
+ [[NSRunLoop currentRunLoop] addEvent: (void *)(intptr_t)[_connection fd]
type: ET_WDESC
watcher: self
forMode: [_runLoopModes objectAtIndex: i]];
@@ -812,7 +812,7 @@
for (i = 0; i < [_runLoopModes count]; i++)
{
- [[NSRunLoop currentRunLoop] addEvent: (void *)[_connection fd]
+ [[NSRunLoop currentRunLoop] addEvent: (void *)(intptr_t)[_connection fd]
#ifdef __MINGW32__
type: ET_HANDLE
#else
@@ -821,7 +821,7 @@
watcher: self
forMode: [_runLoopModes objectAtIndex: i]];
- [[NSRunLoop currentRunLoop] addEvent: (void *)[_connection fd]
+ [[NSRunLoop currentRunLoop] addEvent: (void *)(intptr_t)[_connection fd]
#ifdef __MINGW32__
type: ET_TRIGGER
#else
@@ -878,17 +878,17 @@
forMode: [_runLoopModes objectAtIndex: i]
all: YES];
#else
- [[NSRunLoop currentRunLoop] removeEvent: (void *)[_connection fd]
+ [[NSRunLoop currentRunLoop] removeEvent: (void *)(intptr_t)[_connection fd]
type: ET_RDESC
forMode: [_runLoopModes objectAtIndex: i]
all: YES];
- [[NSRunLoop currentRunLoop] removeEvent: (void *)[_connection fd]
+ [[NSRunLoop currentRunLoop] removeEvent: (void *)(intptr_t)[_connection fd]
type: ET_WDESC
forMode: [_runLoopModes objectAtIndex: i]
all: YES];
- [[NSRunLoop currentRunLoop] removeEvent: (void *)[_connection fd]
+ [[NSRunLoop currentRunLoop] removeEvent: (void *)(intptr_t)[_connection fd]
type: ET_EDESC
forMode: [_runLoopModes objectAtIndex: i]
all: YES];
--- pantomime.orig/Framework/Pantomime/CWConstants.h
+++ pantomime/Framework/Pantomime/CWConstants.h
@@ -141,14 +141,14 @@
}
#define AUTHENTICATION_COMPLETED(del, s) \
-POST_NOTIFICATION(PantomimeAuthenticationCompleted, self, [NSDictionary dictionaryWithObject: ((id)s?(id)s:(id)@"") forKey: @"Mechanism"]); \
-PERFORM_SELECTOR_2(del, @selector(authenticationCompleted:), PantomimeAuthenticationCompleted, ((id)s?(id)s:(id)@""), @"Mechanism");
+POST_NOTIFICATION(PantomimeAuthenticationCompleted, self, [NSDictionary dictionaryWithObject: ((id)s != nil ?(id)s:(id)@"") forKey: @"Mechanism"]); \
+PERFORM_SELECTOR_2(del, @selector(authenticationCompleted:), PantomimeAuthenticationCompleted, ((id)s != nil ?(id)s:(id)@""), @"Mechanism");
#define AUTHENTICATION_FAILED(del, s) \
NSLog(@"AUTHENTICATION_FAILED: |%@|", s); \
-POST_NOTIFICATION(PantomimeAuthenticationFailed, self, [NSDictionary dictionaryWithObject: ((id)s?(id)s:(id)@"") forKey: @"Mechanism"]); \
-PERFORM_SELECTOR_2(del, @selector(authenticationFailed:), PantomimeAuthenticationFailed, ((id)s?(id)s:(id)@""), @"Mechanism");
+POST_NOTIFICATION(PantomimeAuthenticationFailed, self, [NSDictionary dictionaryWithObject: ((id)s != nil ?(id)s:(id)@"") forKey: @"Mechanism"]); \
+PERFORM_SELECTOR_2(del, @selector(authenticationFailed:), PantomimeAuthenticationFailed, ((id)s != nil ?(id)s:(id)@""), @"Mechanism");
#define POST_NOTIFICATION(name, obj, info) \
[[NSNotificationCenter defaultCenter] postNotificationName: name \
--- pantomime.orig/Framework/Pantomime/CWPOP3CacheManager.m
+++ pantomime/Framework/Pantomime/CWPOP3CacheManager.m
@@ -103,7 +103,7 @@
return self;
}
- if(read_uint32(_fd, &_count) <= 0)
+ if(read_uint32(_fd, (uint32_t *)&_count) <= 0)
{
NSLog(@"CWPOP3CacheManager initWithPath: error reading count");
}
|