Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9cb0da6

Browse files
author
Erik Aigner
committed
Merge branch 'master' of http://github.com/schwa/TouchXML
2 parents af0f032 + b39a607 commit 9cb0da6

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Source/CXMLDocument.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ @implementation CXMLDocument
4242

4343
- (id)initWithXMLString:(NSString *)inString options:(NSUInteger)inOptions error:(NSError **)outError
4444
{
45+
#pragma unused (inOptions)
4546
if ((self = [super init]) != NULL)
4647
{
4748
NSError *theError = NULL;
@@ -97,6 +98,7 @@ - (id)initWithData:(NSData *)inData options:(NSUInteger)inOptions error:(NSError
9798

9899
- (id)initWithData:(NSData *)inData encoding:(NSStringEncoding)encoding options:(NSUInteger)inOptions error:(NSError **)outError
99100
{
101+
#pragma unused (inOptions)
100102
if ((self = [super init]) != NULL)
101103
{
102104
NSError *theError = NULL;
@@ -208,6 +210,7 @@ - (NSData *)XMLData
208210

209211
- (NSData *)XMLDataWithOptions:(NSUInteger)options
210212
{
213+
#pragma unused (options)
211214
xmlChar *theBuffer = NULL;
212215
int theBufferSize = 0;
213216
xmlDocDumpMemory((xmlDocPtr)self->_node, &theBuffer, &theBufferSize);

Source/CXMLNode.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ - (void)dealloc
6464

6565
- (id)copyWithZone:(NSZone *)zone;
6666
{
67+
#pragma unused (zone)
6768
xmlNodePtr theNewNode = xmlCopyNode(_node, 1);
6869
CXMLNode *theNode = [[[self class] alloc] initWithLibXMLNode:theNewNode freeOnDealloc:YES];
6970
theNewNode->_private = theNode;
@@ -299,7 +300,9 @@ - (NSString *)XMLString
299300

300301
- (NSString *)XMLStringWithOptions:(NSUInteger)options
301302
{
302-
NSMutableData *theData = [[NSMutableData alloc] init];
303+
#pragma unused (options)
304+
305+
NSMutableData *theData = [[[NSMutableData alloc] init] autorelease];
303306

304307
xmlOutputBufferPtr theOutputBuffer = xmlOutputBufferCreateIO(MyXmlOutputWriteCallback, MyXmlOutputCloseCallback, theData, NULL);
305308

@@ -369,7 +372,5 @@ static int MyXmlOutputWriteCallback(void * context, const char * buffer, int len
369372

370373
static int MyXmlOutputCloseCallback(void * context)
371374
{
372-
NSMutableData *theData = context;
373-
[theData release];
374375
return(0);
375376
}

0 commit comments

Comments
 (0)