2009-12-08 Yavor Doganov <yavor@gnu.org>
Fix some compilation warnings.
* Framework/Pantomime/io.c: Include <stdlib.h>.
* Framework/Pantomime/CWDNSManager.m (-[CWDNSManager
_parseHostsFile]) <theIP>: Declare as nil.
* Framework/Pantomime/CWLocalFolder+maildir.m (-parse_maildir:
all:) <aNewPath>: Likewise.
* Framework/Pantomime/CWInternetAddress.m (-[CWInternetAddress
initWithString:]): Cast b to BOOL as appropriate.
* Frameworks/Pantomime/CWParser.m (+parseDate: inMessage:):
Initialize tz, s.
(+parseDestination: forType: inMessage: quick:): Likewise for len.
--- pantomime1.2-1.2.0~pre3+snap20071004+dfsg.orig/Framework/Pantomime/io.c
+++ pantomime1.2-1.2.0~pre3+snap20071004+dfsg/Framework/Pantomime/io.c
@@ -32,6 +32,7 @@
#endif
#include <stdio.h>
+#include <stdlib.h>
#include <string.h> // For memset()
#include <netinet/in.h> // For ntohs() and friends.
--- pantomime1.2-1.2.0~pre3+snap20071004+dfsg.orig/Framework/Pantomime/CWDNSManager.m
+++ pantomime1.2-1.2.0~pre3+snap20071004+dfsg/Framework/Pantomime/CWDNSManager.m
@@ -397,7 +397,7 @@
if (aString)
{
- NSString *aWord, *theIP;
+ NSString *aWord, *theIP = nil;
NSScanner *aScanner;
aScanner = [NSScanner scannerWithString: aString];
--- pantomime1.2-1.2.0~pre3+snap20071004+dfsg.orig/Framework/Pantomime/CWInternetAddress.m
+++ pantomime1.2-1.2.0~pre3+snap20071004+dfsg/Framework/Pantomime/CWInternetAddress.m
@@ -103,7 +103,7 @@
idx = 0;
while (b && idx < a-d)
{
- b = isspace(buf[idx]);
+ b = (BOOL) isspace(buf[idx]);
idx++;
}
}
--- pantomime1.2-1.2.0~pre3+snap20071004+dfsg.orig/Framework/Pantomime/CWLocalFolder+maildir.m
+++ pantomime1.2-1.2.0~pre3+snap20071004+dfsg/Framework/Pantomime/CWLocalFolder+maildir.m
@@ -116,7 +116,7 @@
//
- (void) parse_maildir: (NSString *) theDirectory all: (BOOL) theBOOL
{
- NSString *aPath, *aNewPath, *thisMailFile;
+ NSString *aPath, *aNewPath = nil, *thisMailFile;
NSFileManager *aFileManager;
NSMutableArray *allFiles;
FILE *aStream;
--- pantomime1.2-1.2.0~pre3+snap20071004+dfsg.orig/Framework/Pantomime/CWParser.m
+++ pantomime1.2-1.2.0~pre3+snap20071004+dfsg/Framework/Pantomime/CWParser.m
@@ -358,7 +358,8 @@
{
NSData *aData;
- int month, day, year, hours, mins, secs, tz, i, j, len, tot, s;
+ int month, day, year, hours, mins, secs, i, j, len, tot;
+ int tz = 0, s = 0;
unsigned char *bytes, *word;
aData = [theLine subdataFromIndex: 6];
@@ -525,7 +526,7 @@
CWInternetAddress *anInternetAddress;
NSData *aData;
- int i, len, s_len, x, y;
+ int i, len = 0, s_len, x, y;
unsigned char *bytes;
BOOL b;