View Full Version : Canīt get past compile warning when using FSPathMakeRef?

Jan 30, 2009, 03:14 PM
So this is what I got so far.

UInt8 const *inFile = "drBcrash.wav";
FSRef outFile;

FSPathMakeRef(inFile, &outFile, NULL);

The warning is generated from the first argument I think. This is the gcc warning: warning: pointer targets in initialization differ in signedness

How could this be solved? Any ideas.
Also, are there any easier way to assign a c-string to an FSRef?

I have tried this, which didnīt work at all unfortunately.

FSRef inFile;
inFile.hidden = CFSTR("drBcrash.wav");

Jan 30, 2009, 04:12 PM
Probably need to cast the string: const UInt8 *inFile = (const UInt8 *)"drBcrash.wav";You can also use CFURLGetFSRef() if working with CF objects.

Jan 30, 2009, 04:23 PM
That worked, what a releif.

Iīll check out CFURLGetFSRef() as well.

Thank you!