Re: Does this caution need fixed? (newb)

2008-07-09 Thread Chris Paveglio
I'm trying to make sure that this part of my code is good and clean and not leaking. I believe that I have it right (but still think I have something wrong). This code makes a list of file paths, and then copies the files or folders from their location to the destination the user selected. If

Re: Does this caution need fixed? (newb)

2008-07-09 Thread Jens Alfke
On 9 Jul '08, at 7:44 AM, Chris Paveglio wrote: I'm trying to make sure that this part of my code is good and clean and not leaking. I believe that I have it right (but still think I have something wrong). It looks OK to me on quick reading. The main thing I'd change is to put the path

Re: Does this caution need fixed? (newb)

2008-07-09 Thread Brian Stern
On Jul 9, 2008, at 10:44 AM, Chris Paveglio wrote: I'm trying to make sure that this part of my code is good and clean and not leaking. I believe that I have it right (but still think I have something wrong). This code makes a list of file paths, and then copies the files or folders from

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Sherm Pendley
On Thu, Jul 3, 2008 at 1:47 PM, Kyle Sluder [EMAIL PROTECTED] wrote: Many (dare I say most?) developers consider warnings to be the equivalent of the compiler vomiting in its mouth -- errors are the subsequent suffocation. Perhaps you can tell how strongly I feel about this. I completely

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Jason Stephenson
Chris Paveglio wrote: My code is like this: NSMutableString *theSettings; theSettings = [[NSMutableString alloc] init]; //myPrefs is an array of strings, each item is like Library/Safari int i; for (i = 0; i 8; i++ { theSettings = [NSHomeDirectory()

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Steve Christensen
On Jul 3, 2008, at 9:40 AM, Chris Paveglio wrote: Also, should my code be caution free as a sign of clean coding or can some cautions that don't affect functionality be dismissed? I'm one of those people who turns on just about every warning and then fixes the code that generates the

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Sean McBride
On 7/3/08 9:40 AM, Chris Paveglio said: I have a loop that gets the user's home directory, and then adds a string to complete the file path for several files. This line: theSettings = [NSHomeDirectory() stringByAppendingPathComponent:[myPrefs objectAtIndex:i]]; gives me a caution sign when I

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Jason Stephenson
Chris Paveglio wrote: Thanks all for your help and insight! I believe Jason's solution will work for me as I am changing the assignment of what theSetting is each time through the loop. I have a list (array) of files that gets copied from one place to the other, and I change the origin and the