Skip to content

Commit

Permalink
Bumped up almost all of the warnings in the TestApp project and fixed…
Browse files Browse the repository at this point in the history
… the resulting issues.
  • Loading branch information
iwankerl committed Jun 1, 2014
1 parent 2e16bb9 commit 6753129
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 9 deletions.
2 changes: 1 addition & 1 deletion FsprgEmbeddedStore/FsprgEmbeddedStoreController.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@
*/
- (NSString *)storeHost;

@end

This comment has been minimized.

Copy link
@timtim9620

timtim9620 May 27, 2018

Yes

@end
4 changes: 2 additions & 2 deletions FsprgEmbeddedStore/FsprgEmbeddedStoreController.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ - (void)resizeContentDivE
return;
}

float windowHeight = [[self webView] frame].size.height;
CGFloat windowHeight = [[self webView] frame].size.height;
id result = [[[self webView] windowScriptObject] evaluateWebScript:@"document.getElementsByClassName('store-page-navigation')[0].clientHeight"];
if (result == [WebUndefined undefined]) {
return;
Expand All @@ -220,7 +220,7 @@ - (void)resizeContentDivE
float paddingTop = [[[cssStyle paddingBottom] substringToIndex:[[cssStyle paddingTop] length]-2] floatValue];
float paddingBottom = [[[cssStyle paddingBottom] substringToIndex:[[cssStyle paddingBottom] length]-2] floatValue];

float newHeight = windowHeight - paddingTop - paddingBottom - pageNavigationHeight;
CGFloat newHeight = windowHeight - paddingTop - paddingBottom - pageNavigationHeight;
[[resizableContentE style] setHeight:[NSString stringWithFormat:@"%fpx", newHeight]];
}

Expand Down
8 changes: 7 additions & 1 deletion FsprgEmbeddedStore/FsprgStoreParameters.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ + (void)initialize
NSStringFromSelector(@selector(orderProcessType)),
NSStringFromSelector(@selector(storeId)),
NSStringFromSelector(@selector(productId)),
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wselector"
NSStringFromSelector(@selector(mode)),
#pragma clang diagnostic pop
NSStringFromSelector(@selector(campaign)),
NSStringFromSelector(@selector(option)),
NSStringFromSelector(@selector(referrer)),
Expand Down Expand Up @@ -143,7 +146,10 @@ - (NSURL *)toURL
[keys removeObject:kOrderProcessType];
[keys removeObject:kStoreId];
[keys removeObject:kProductId];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wselector"
[keys sortUsingSelector:@selector(compare:)];
#pragma clang diagnostic pop

NSString *queryStr = @"";
NSUInteger i, count = [keys count];
Expand Down Expand Up @@ -333,4 +339,4 @@ - (void)dealloc
[super dealloc];
}

@end
@end
8 changes: 4 additions & 4 deletions TestApp/AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ - (NSView *)viewWithFrame:(NSRect)frame forOrder:(FsprgOrder *)order
NSData *data = [NSPropertyListSerialization dataFromPropertyList:[order raw]
format:NSPropertyListXMLFormat_v1_0
errorDescription:&errorDesc];
NSString *orderAsStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSString *orderAsStr = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];

OrderViewController *orderViewController = [[OrderViewController alloc] initWithNibName:@"OrderView" bundle:nil];
OrderViewController *orderViewController = [[[OrderViewController alloc] initWithNibName:@"OrderView" bundle:nil] autorelease];
[orderViewController setRepresentedObject:orderAsStr];

[[[orderViewController view] window] setBackgroundColor:[NSColor blackColor]];
Expand All @@ -136,12 +136,12 @@ - (NSView *)viewWithFrame:(NSRect)frame forOrder:(FsprgOrder *)order

- (void)webView:(WebView *)sender didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
{
NSRunAlertPanel(@"Alert", [error localizedDescription], @"OK", nil, nil);
NSRunAlertPanel(@"Alert", @"%@", @"OK", nil, nil, [error localizedDescription]);
}

- (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
{
NSRunAlertPanel(@"Alert", [error localizedDescription], @"OK", nil, nil);
NSRunAlertPanel(@"Alert", @"%@", @"OK", nil, nil, [error localizedDescription]);
}

// NSApplicationDelegate
Expand Down
82 changes: 81 additions & 1 deletion TestApp/TestApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0440;
LastUpgradeCheck = 0510;
ORGANIZATIONNAME = FastSpring;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TestApp" */;
Expand Down Expand Up @@ -376,9 +376,49 @@
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_CXX0X_EXTENSIONS = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES;
CLANG_WARN_OBJC_RECEIVER_WEAK = YES;
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES;
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TestApp_Prefix.pch;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_PEDANTIC = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_SIGN_COMPARE = YES;
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = TestApp;
WRAPPER_EXTENSION = app;
Expand All @@ -388,9 +428,49 @@
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_CXX0X_EXTENSIONS = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES;
CLANG_WARN_OBJC_RECEIVER_WEAK = YES;
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES;
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TestApp_Prefix.pch;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_PEDANTIC = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_SIGN_COMPARE = YES;
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = TestApp;
WRAPPER_EXTENSION = app;
Expand Down

0 comments on commit 6753129

Please sign in to comment.