Skip to content

Commit cabb816

Browse files
author
Patrick Thomson
committed
Added the -Wall flag.
1 parent 23e47e7 commit cabb816

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

YAMLKit.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,12 +397,14 @@
397397
GCC_OPTIMIZATION_LEVEL = 0;
398398
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
399399
GCC_WARN_ABOUT_RETURN_TYPE = YES;
400+
GCC_WARN_PEDANTIC = NO;
400401
GCC_WARN_UNUSED_VARIABLE = YES;
401402
HEADER_SEARCH_PATHS = /usr/local/include/;
402403
LIBRARY_SEARCH_PATHS = /usr/local/lib/;
403404
ONLY_ACTIVE_ARCH = YES;
404405
PREBINDING = NO;
405406
SDKROOT = macosx10.5;
407+
WARNING_CFLAGS = "-Wall";
406408
};
407409
name = Debug;
408410
};
@@ -414,11 +416,13 @@
414416
GCC_ENABLE_OBJC_GC = supported;
415417
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
416418
GCC_WARN_ABOUT_RETURN_TYPE = YES;
419+
GCC_WARN_PEDANTIC = NO;
417420
GCC_WARN_UNUSED_VARIABLE = YES;
418421
HEADER_SEARCH_PATHS = /usr/local/include/;
419422
LIBRARY_SEARCH_PATHS = /usr/local/lib/;
420423
PREBINDING = NO;
421424
SDKROOT = macosx10.5;
425+
WARNING_CFLAGS = "-Wall";
422426
};
423427
name = Release;
424428
};

src/YKEmitter.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ @implementation YKEmitter
1414

1515
- (id)init
1616
{
17-
if(self = [super init]) {
17+
if((self = [super init])) {
1818
memset(&emitter, 0, sizeof(emitter));
1919
yaml_emitter_initialize(&emitter);
2020

@@ -34,6 +34,8 @@ - (void)emitItem:(id)item
3434
// Create and initialize a document to hold this.
3535
yaml_document_t document;
3636
memset(&document, 0, sizeof(document));
37+
// The double usage of !usesExplicitDelimiters is to indicate that both the start and the end of the
38+
// document should be delimited, if at all.
3739
yaml_document_initialize(&document, NULL, NULL, NULL, !usesExplicitDelimiters, !usesExplicitDelimiters);
3840

3941
[self _writeItem:item toDocument:&document];

src/YKParser.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ - (NSArray *)parseWithError:(NSError **)e
6565
if(!yaml_parser_parse(&parser, &event)) {
6666
if(e != NULL) {
6767
*e = [self _constructErrorFromParser:&parser];
68-
return nil;
6968
}
7069
return nil;
7170
}
@@ -166,6 +165,7 @@ - (NSError *)_constructErrorFromParser:(yaml_parser_t *)p
166165
case YAML_UTF16BE_ENCODING:
167166
enc = NSUTF16BigEndianStringEncoding;
168167
break;
168+
default: break;
169169
}
170170
[data setObject:[NSNumber numberWithInt:enc] forKey:NSStringEncodingErrorKey];
171171

0 commit comments

Comments
 (0)