Incompatible Pointer Types A* and A*

In refactoring a messy ViewController, I'm encountering an inspection that flags an error on this line:

         LayoutInfo *j=[self.mapView getLayout].PreviousInOutline(info,[self parent]);


with the message

     Incompatible pointer types LayoutInfo * and LayoutInfo *

What is the static analyzer trying to say?  The code does compile, but of course the red flags make me see read.

For background:

     LayoutInfo* LayoutMap::PreviousInOutline(const LayoutInfo *info, const Node *parent);
1 comment

Hi Mark,

looks like a bug. Could you please raise an issue in http://youtrack.jetbrains.com for this defect.
As a quick fix you can suppress this warning by pressing Alt+Enter and selecting 'Ignore "-Wincompatible-pointer-types" for file' or unmark 'Incompatible pointers' checkbox in Preferences -> Inspections -> Type checks.

0

Please sign in to leave a comment.