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: hendrixgr .
Subject: Re: [Paparazzi-devel] compile warning when i use the drotek 10dof imu
Date: Mon, 9 Sep 2013 11:03:11 +0300

In any case it works fine, i just tested it.
Btw i have a strange problem with the imu driver Felix.
As you probably know i have wrote my own version which i just discovered that it works fine with a TWOG but it doesn't work (it receives 1s from the i2c bus) with the stm32 architecture.
The official driver works everywhere.
Chris



On Mon, Sep 9, 2013 at 8:50 AM, Ben Laurie <address@hidden> wrote:



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?


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



reply via email to

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