adium-1.4 2650:4bbeb939b623: Turning on a bunch of warnings—mo...
commits at adium.im
commits at adium.im
Wed Oct 28 01:47:42 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/4bbeb939b623
revision: 2650:4bbeb939b623
author: Peter Hosey <hg at boredzo.org>
date: Tue Oct 27 18:17:27 2009 -0700
Turning on a bunch of warnings—most significantly, the 64-to-32 warning.
Subject: adium-1.4 2651:6df2eddd7694: Set kMDItemDurationSeconds to a double, not an int. Fixes a warning.
details: http://hg.adium.im/adium-1.4/rev/6df2eddd7694
revision: 2651:6df2eddd7694
author: Peter Hosey <hg at boredzo.org>
date: Tue Oct 27 18:21:10 2009 -0700
Set kMDItemDurationSeconds to a double, not an int. Fixes a warning.
The documentation explicitly says that non-integral values are supported: http://developer.apple.com/mac/library/documentation/Carbon/Reference/MDItemRef/Reference/reference.html#//apple_ref/doc/c_ref/kMDItemDurationSeconds
Subject: adium-1.4 2652:9c81942d72e0: Suppress built-in functions in the Spotlight importer.
details: http://hg.adium.im/adium-1.4/rev/9c81942d72e0
revision: 2652:9c81942d72e0
author: Peter Hosey <hg at boredzo.org>
date: Tue Oct 27 18:31:37 2009 -0700
Suppress built-in functions in the Spotlight importer.
Fixes a warning of our strndup shadowing a built-in function (which I couldn't figure out how to use—the linker kept complaining that it didn't exist).
Subject: adium-1.4 2653:f5ee0a12d3aa: Fixed sign-comparison warnings by unifying variables on size_t instead of int.
details: http://hg.adium.im/adium-1.4/rev/f5ee0a12d3aa
revision: 2653:f5ee0a12d3aa
author: Peter Hosey <hg at boredzo.org>
date: Tue Oct 27 18:40:52 2009 -0700
Fixed sign-comparison warnings by unifying variables on size_t instead of int.
Subject: adium-1.4 2654:ea46c3d28055: Renaming this variable to fix a shadowed-declaration warning.
details: http://hg.adium.im/adium-1.4/rev/ea46c3d28055
revision: 2654:ea46c3d28055
author: Peter Hosey <hg at boredzo.org>
date: Tue Oct 27 18:42:26 2009 -0700
Renaming this variable to fix a shadowed-declaration warning.
Subject: adium-1.4 2655:ad2be6a7703c: Added explicit casts to suppress the last 64-to-32 warnings.
details: http://hg.adium.im/adium-1.4/rev/ad2be6a7703c
revision: 2655:ad2be6a7703c
author: Peter Hosey <hg at boredzo.org>
date: Tue Oct 27 18:46:12 2009 -0700
Added explicit casts to suppress the last 64-to-32 warnings.
We are now back to zero warnings in the Spotlight importer.
Subject: adium-1.4 2656:a3663655a9db: Turning on static analysis while building. No flags.
details: http://hg.adium.im/adium-1.4/rev/a3663655a9db
revision: 2656:a3663655a9db
author: Peter Hosey <hg at boredzo.org>
date: Tue Oct 27 18:46:27 2009 -0700
Turning on static analysis while building. No flags.
Subject: adium-1.4 2657:ad52bfd5b3bd: Turning on hardass mode for the Spotlight Importer.
details: http://hg.adium.im/adium-1.4/rev/ad52bfd5b3bd
revision: 2657:ad52bfd5b3bd
author: Peter Hosey <hg at boredzo.org>
date: Tue Oct 27 18:47:03 2009 -0700
Turning on hardass mode for the Spotlight Importer.
diffs (164 lines):
diff -r b8864f1d2aa7 -r ad52bfd5b3bd Frameworks/AIUtilities Framework/Source/NSCalendarDate+ISO8601Parsing.m
--- a/Frameworks/AIUtilities Framework/Source/NSCalendarDate+ISO8601Parsing.m Tue Oct 27 13:19:26 2009 -0400
+++ b/Frameworks/AIUtilities Framework/Source/NSCalendarDate+ISO8601Parsing.m Tue Oct 27 18:47:03 2009 -0700
@@ -439,10 +439,10 @@
case 1:; //-YY; -YY-MM (implicit century)
NSLog(@"(%@) found %u digits and one hyphen, so this is either -YY or -YY-MM; segment (year) is %u", str, num_digits, segment);
unsigned current_year = [now yearOfCommonEra];
- unsigned century = (current_year % 100U);
+ unsigned current_century = (current_year % 100U);
year = segment + (current_year - century);
if(num_digits == 1U) //implied decade
- year += century - (current_year % 10U);
+ year += current_century - (current_year % 10U);
if(*ch == '-') {
++ch;
@@ -578,8 +578,8 @@
month:month_or_week
day:day
hour:hour
- minute:minute
- second:second
+ minute:(NSUInteger)minute
+ second:(NSUInteger)second
timeZone:timeZone];
break;
@@ -600,8 +600,8 @@
month:1
day:1
hour:hour
- minute:minute
- second:second
+ minute:(NSUInteger)minute
+ second:(NSUInteger)second
timeZone:timeZone];
date = [date dateByAddingYears:0
months:0
diff -r b8864f1d2aa7 -r ad52bfd5b3bd Other/Adium Spotlight Importer/AdiumSpotlightImporter.xcodeproj/project.pbxproj
--- a/Other/Adium Spotlight Importer/AdiumSpotlightImporter.xcodeproj/project.pbxproj Tue Oct 27 13:19:26 2009 -0400
+++ b/Other/Adium Spotlight Importer/AdiumSpotlightImporter.xcodeproj/project.pbxproj Tue Oct 27 18:47:03 2009 -0700
@@ -411,10 +411,26 @@
APPLY_RULES_IN_COPY_FILES = YES;
ARCHS = "$(NATIVE_ARCH)";
GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_VERSION = 4.2;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
+ GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+ GCC_WARN_MISSING_PARENTHESES = YES;
+ GCC_WARN_SHADOW = YES;
+ GCC_WARN_SIGN_COMPARE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
+ GCC_WARN_UNUSED_VALUE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_OUTPUT_FORMAT = xml;
ONLY_ACTIVE_ARCH = YES;
+ OTHER_CFLAGS = "-fno-builtin";
PLIST_FILE_OUTPUT_FORMAT = xml;
+ RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = macosx10.5;
SYMROOT = ../../build;
VALID_ARCHS = "i386 ppc ppc64 ppc7400 ppc970 x86_64";
@@ -500,9 +516,26 @@
APPLY_RULES_IN_COPY_FILES = YES;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_VERSION = 4.2;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
+ GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+ GCC_WARN_MISSING_PARENTHESES = YES;
+ GCC_WARN_SHADOW = YES;
+ GCC_WARN_SIGN_COMPARE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
+ GCC_WARN_UNUSED_VALUE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_OUTPUT_FORMAT = binary;
+ OTHER_CFLAGS = "-fno-builtin";
PLIST_FILE_OUTPUT_FORMAT = binary;
+ RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = macosx10.5;
SYMROOT = ../../build;
};
@@ -527,9 +560,26 @@
APPLY_RULES_IN_COPY_FILES = YES;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_VERSION = 4.2;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
+ GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+ GCC_WARN_MISSING_PARENTHESES = YES;
+ GCC_WARN_SHADOW = YES;
+ GCC_WARN_SIGN_COMPARE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
+ GCC_WARN_UNUSED_VALUE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_OUTPUT_FORMAT = binary;
+ OTHER_CFLAGS = "-fno-builtin";
PLIST_FILE_OUTPUT_FORMAT = binary;
+ RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = macosx10.5;
SYMROOT = ../../build;
};
diff -r b8864f1d2aa7 -r ad52bfd5b3bd Other/Adium Spotlight Importer/GetMetadataForFile.m
--- a/Other/Adium Spotlight Importer/GetMetadataForFile.m Tue Oct 27 13:19:26 2009 -0400
+++ b/Other/Adium Spotlight Importer/GetMetadataForFile.m Tue Oct 27 18:47:03 2009 -0700
@@ -181,7 +181,7 @@
dateStr = [[(NSXMLElement *)[children lastObject] attributeForName:@"time"] objectValue];
endDate = (dateStr ? [NSCalendarDate calendarDateWithString:dateStr] : nil);
if (endDate)
- [(NSMutableDictionary *)attributes setObject:[NSNumber numberWithInt:[endDate timeIntervalSinceDate:startDate]]
+ [(NSMutableDictionary *)attributes setObject:[NSNumber numberWithDouble:[endDate timeIntervalSinceDate:startDate]]
forKey:(NSString *)kMDItemDurationSeconds];
}
diff -r b8864f1d2aa7 -r ad52bfd5b3bd Other/Adium Spotlight Importer/GetMetadataForHTMLLog.m
--- a/Other/Adium Spotlight Importer/GetMetadataForHTMLLog.m Tue Oct 27 13:19:26 2009 -0400
+++ b/Other/Adium Spotlight Importer/GetMetadataForHTMLLog.m Tue Oct 27 18:47:03 2009 -0700
@@ -232,13 +232,13 @@
static char *
gaim_markup_strip_html(const char *str)
{
- int i, j, k;
+ size_t i, j, k;
BOOL visible = TRUE;
BOOL closing_td_p = FALSE;
char *str2;
const char *cdata_close_tag = NULL;
char *href = NULL;
- int href_st = 0;
+ size_t href_st = 0;
if(!str)
return NULL;
@@ -297,8 +297,8 @@
if (strncasecmp(str2 + i, "<a", 2) == 0 &&
g_ascii_isspace(str2[i+2]))
{
- int st; /* start of href, inclusive [ */
- int end; /* end of href, exclusive ) */
+ size_t st; /* start of href, inclusive [ */
+ size_t end; /* end of href, exclusive ) */
char delim = ' ';
/* Find start of href */
for (st = i + 3; st < k; st++)
More information about the commits
mailing list