express my interests in applying GSoC 2012

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

 



On 22/03/12 08:58, Tanu Kaskinen wrote:
> On Wed, 2012-03-21 at 16:21 +0100, David Henningsson wrote:
>
>> > 
>> > A quick grep through the code shows that this is how we've been doing it
>> > up till now, so we should probably keep it that way for consistency.
>> > 
>> > So, just for education, would you mind resending the patch with git
>> > send-email, and using %llx ? Thanks!
> At the risk of turning this into prolonged bikeshedding, IMO the PRI
> constants would be the better solution (with a small margin). I have
> myself used the casting solution in the past to get rid of compiler
> warnings, but that has been because I didn't know about the PRI
> constants.

Just sticking my oar in here :)

The PRI constants are the right way to do it.   You can get away with
casts and %llx (or whatever) almost all the time.

The trouble is the "almost all".   Sooner or later you're going to get
something breaking either because %llx turns out to be wrong or because
the cast turns out to be wrong and the compiler has explicitly been told
not to notice.   Change it to PRI and let the compiler do its job; you
won't regret it in the long run.

jch


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux