paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] compile warning when i use the drotek 10dof imu


From: Ben Laurie
Subject: Re: [Paparazzi-devel] compile warning when i use the drotek 10dof imu
Date: Mon, 9 Sep 2013 06:50:29 +0100




On 8 September 2013 20:32, Felix Ruess <address@hidden> wrote:
I don't know how to get rid off that diagnostic warning, as I'm pretty sure the code is correct:

The i2c_trans.buf is marked volatile. If the explicit cast to void* is omitted, it will warn that the volatile attribute is discarded... so the volatile qualifier of the buf is explicitly cast away, since we know that here memcpy is only called when the transaction is done and the contents of the buf actually won't change anymore.

This is surely not the cause - the warning must be about a function pointer - noreturn makes no sense on any other kind of pointer.

Well, that is what I though as well and hence I actually don't understand why it complains about this...
But the warning definitely comes from that line and if you omit the cast to void* then it warns about the volatile attribute of the argument 2 being discarded instead (which makes sense).

So again: any insight into this would be appreciated...

Interesting. How would I build to see that warning? Alternatively, what causes the similar warnings in the ardrone2_raw build?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]