Re: [PATCH] Fix pointer cast for 32 bits arch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 12, 2015 at 8:14 PM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> On Sun, 2015-04-12 at 17:38 +0200, Geert Uytterhoeven wrote:
>> Perhaps checkpatch should complain about casts outside header files?
>
> I think that's not feasible/desirable.
>
> type casting is pretty common and necessary.
> There are 50k+ casts in drivers/ alone.

What a pity.... How many of those are wrong? ;-)

If there's one thing I like about C++, it's the new-style casts, and how easy
they are to grep for, unlike their C counterparts.

It would help if gcc offered -Wcast, so we could at least identify all newly
introduced casts by comparing build logs, and audit them manually (like
with other warnings).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux