|
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 |
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...
[Prev in Thread] | Current Thread | [Next in Thread] |