[vbox-dev] assignment makes pointer from integer without a cast in fakedri_drv.c
Leonid.Lobachev at sun.com
Wed Dec 2 08:17:24 PST 2009
Michal Seben <mseben at ...> writes:
> Hi all!
> I have problem with next piece of code in
> shift = pStart-(dlip.dli_saddr+5);
> build runs fine, but I hit warning
> warning: assignment makes pointer from integer without a cast
> and our build check scripts in build.opensuse.org resolve this warning as
> unacceptable, so I suppose this should be fixed to :
> shift = (void *)(uintptr_t)pStart-((uintptr_t)dlip.dli_saddr-5);
> patch attached, if patch is not acceptable please, could someone fix this
> warning ?
Thanks for noticing the warning.
Your change is a bit wrong though, because you've changed +5 to -5 ...
Also, it should be cast to intptr_t.
I'd add the change to our tree after the test.
More information about the vbox-dev