liuyong/ziparchive

NSLog Usage incorrect

Closed this issue · 3 comments

When you compile the source, you will get warnings about ZipArchive.mm:

NSLog([NSString stringWithFormat:@"%d entries in the zip 
file",globalInfo.number_entry] );


NSLog actually takes at least 2 parameters, and the first one is the format. So 
for that line you can just do:


NSLog(@"%d entries in the zip file",globalInfo.number_entry );

The other NSLog calls if they are just a single string should actually be:

NSLog(@"%@", @"String Here");

Original issue reported on code.google.com by christop...@gmail.com on 22 Jun 2010 at 1:47

Here is the other one rewritten:

NSLog(@"%@", @"Failed to set attributes");

Original comment by christop...@gmail.com on 22 Jun 2010 at 1:48

http://github.com/soundevolution/ZipArchive/issues/2

I'm not sure that NSLog really needs 2+ arguments... forever print("hello 
world\n"); was ok.

Original comment by matt.con...@gmail.com on 26 Sep 2010 at 7:31

Original comment by elinc...@hachisoft.com on 15 Feb 2011 at 8:24

  • Changed state: WontFix