... and more-tightly scope variables to avoid similar problems in future
../../libraries/AP_NavEKF3/AP_NavEKF3_PosVelFusion.cpp:898:17: warning: Value stored to 'posCheckPassed' is never read [deadcode.DeadStores]
posCheckPassed = true;
^ ~~~~
../../libraries/AP_NavEKF3/AP_NavEKF3_PosVelFusion.cpp:946:17: warning: Value stored to 'posCheckPassed' is never read [deadcode.DeadStores]
posCheckPassed = true;
^ ~~~~
this assignment is done 4 lines down
../../libraries/AP_NavEKF3/AP_NavEKF3_PosVelFusion.cpp:823:17: warning: Value stored to 'posCheckPassed' is never read [deadcode.DeadStores]
posCheckPassed = true;
^ ~~~~
The file handle and object are always allocated together. Combine them
to avoid overhead from extra allocations and additional error cases.
Also simplify by using strdup for the pathname.
the timer routing attempts to read a reading off the bus straihgt-up, but after initialisation the sensor will not be attempting to provide one, so this will always fail.
Request a sample as the last thing we do in the init routine
this doesn't gain us anything; it's a private function which is only called in one place and replicates checks that the caller already makes (it devolves into a one-liner, essentially!)
This method is also confusing as it sits next to "get_temperature" in the code, which is actually a match for get_differential_pressure, not get_pressure
... but the chief advantage IMO is not updating the healthy state in this method.
In particular this fixes some exceedingly rare/impossible
use-after-frees.
Add the new docs from the distribution and clarify where we get our code
from. To maintain our alterations, the following patches have been
applied to the source from upstream's repository (1221e987...75ea9ccb)
to bring the source up to date:
* Bug: Long brackets with a huge number of '=' causes overflow
A long bracket with too many equal signs can overflow the 'int' used for
the counting and some arithmetic done on the value. Changing the counter
to 'size_t' avoids that. (Because what is counted goes to a buffer, an
overflow in the counter will first raise a buffer-overflow error.)
* Fixed bug in 'lua_upvaluejoin'
Bug-fix: joining an upvalue with itself could cause a use-after-free
crash.
* Fixed typos in comments
* Fixed missing GC barriers in compiler and undump
While building a new prototype, the GC needs barriers for every object
(strings and nested prototypes) that is attached to the new prototype.
* Updated release number and copyright year
* Fixed bug: invalid mode can crash 'io.popen'
* Fixed bug: Negation overflow in getlocal/setlocal
* 'realloc' can fail when shrinking a block
According to ISO C, 'realloc' can fail when shrinking a block. If that
happens, 'l_alloc' simply ignores the fail and returns the original
block.
* Fixed bug of long strings in binary chunks
When "undumping" a long string, the function 'LoadVector' can call the
reader function, which can run the garbage collector, which can collect
the string being read. So, the string must be anchored during the call
to 'LoadVector'.