More notes on Assignment 1A

0 views
Skip to first unread message

Radamanthus Batnag

unread,
Feb 6, 2010, 11:57:18 PM2/6/10
to cocoahea...@googlegroups.com
Last meet-up Topher mentioned a warning message that others in the group weren't able to replicate.

It turns out that's unique to Snow Leopard/XCode 3.2:
http://stackoverflow.com/questions/1677824/snowleopard-xcode-warning-format-not-a-string-literal-and-no-format-arguments

Following the instructions from the SO answer, I changed the offending line:
NSLog(fullPath);

into:
NSLog(@"%@", fullPath);

and the warning disappeared.


Regards,
rad

Eumir Gaspar

unread,
Feb 7, 2010, 2:08:44 AM2/7/10
to cocoahea...@googlegroups.com
Just to clarify, does that mean that even if it we are using Leopard, we should still use the NSLOG(@"%@" m fullPath) syntax since just logging fullpath is a potential bug that can crash the app? 
--
Eumir Gaspar
Web Developer
http://admoolabs.com

Radamanthus Batnag

unread,
Feb 7, 2010, 3:11:03 AM2/7/10
to cocoahea...@googlegroups.com
Yep. Check out Jon Hess's answer in the stackoverflow link. He explains why that syntax is unsafe and a potential security hole.
Reply all
Reply to author
Forward
0 new messages