Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

subsonix

macrumors 68040
Original poster
Feb 2, 2008
3,551
79
So this is what I got so far.

Code:
	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.
Code:
	 FSRef inFile;
	 inFile.hidden = CFSTR("drBcrash.wav");
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Probably need to cast the string:
Code:
const UInt8 *inFile = (const UInt8 *)"drBcrash.wav";
You can also use CFURLGetFSRef() if working with CF objects.
 

subsonix

macrumors 68040
Original poster
Feb 2, 2008
3,551
79
That worked, what a releif.

I´ll check out CFURLGetFSRef() as well.

Thank you!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.