Joao Lopes
Joao Lopes

Reputation: 1

warning: passing argument 1 of 'CGPathMoveToPoint' discards qualifiers from pointer target type

I keep getting this warning warning: passing argument 1 of 'CGPathMoveToPoint' discards qualifiers from pointer target type

I am calling the function like this

const CGAffineTransform m = CGAffineTransformIdentity;
CGPathMoveToPoint(path, &m , nextPos.x, nextPos.y);

I already tried

CGPathMoveToPoint(path, NULL , nextPos.x, nextPos.y);

or

CGAffineTransform m = CGAffineTransformIdentity;
CGPathMoveToPoint(path, &m , nextPos.x, nextPos.y);

But i always get this error, how do i get rid of it?

Upvotes: 0

Views: 1527

Answers (1)

Chuck
Chuck

Reputation: 237050

The warning is about argument 1, but all your variations are on argument 2. Try changing argument 1, path — probably to get rid of a rogue const — and that should fix it.

Upvotes: 6

Related Questions