[PATCH] xrandr: fix brightness to prevent gamma to overflow and to allow 0

Matthias Hopf mhopf at suse.de
Tue Jan 12 06:29:23 PST 2010


On Jan 12, 10 13:10:36 +0100, Éric Piel wrote:
> Op 12-01-10 13:09, Matthias Hopf schreef:
> > Ok, pushed modulo a warning fix. Due to -Wbad-function-cast the (CARD16)
> > cast must be removed - but it is superfluous anyway.
> Ah, ok. I had seen the warning, but hadn't dare removing the explicit cast.

I was puzzled at first as well - and personally I think that this
warning is truly bad. It's supposed to detect the unprototyped use of
malloc() (so malloc is implicitly supposed to return int, but then cast
to a pointer). But -Wimplicit-function-declaration (included in -Wall)
should be good enough in that scenario.

Matthias

-- 
Matthias Hopf <mhopf at suse.de>      __        __   __
Maxfeldstr. 5 / 90409 Nuernberg   (_   | |  (_   |__          mat at mshopf.de
Phone +49-911-74053-715           __)  |_|  __)  |__  R & D   www.mshopf.de


More information about the xorg-devel mailing list