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