[vbox-dev] assignment makes pointer from integer without a cast in fakedri_drv.c
Leonid
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
> src/VBox/Additions/common/crOpenGL/fakedri_drv.c:201
> --
> shift = pStart-(dlip.dli_saddr+5);
> --
> build runs fine, but I hit warning
> :
> --
> /usr/src/packages/BUILD/VirtualBox-3.1.0_OSE/src/VBox/Additions/common/
crOpenGL/fakedri_drv.c:201:
> 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
>
Hi Michal,
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.
Leonid.
More information about the vbox-dev
mailing list