lindsayHan / ziparchive

Automatically exported from code.google.com/p/ziparchive
0 stars 0 forks source link

NSLog Usage incorrect #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
Here is the other one rewritten:

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

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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago

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