The second member, called buf (at location 4) is not a char. The type of that member is defined at 0x3451, and this is an array type. Its elements are each of the type defined at 0x2d04, which is a typedef named Char, which redirects to 0x29b7, which is indeed char (represented as base type signed char).
<1><3451>: Abbrev Number: 11 (...
Maybe it is the temperature in Kelvin: 311 - 80/2 = 217K = -2.15°C
Or the offset is different than 80/2. A 16-bit floating-poitn format, especially a different one from IEEE-754 is highly unlikely. Such measurement chips are not more but simple ADCs, they lack the capabilities to convert their reading to floating-point.
To be sure, you would have to take ...
Consider a function like this:
int func1(int x)
y = x;
If the compiler uses a naive variable allocation algorithm and does not try to use registers for variables, it will likely lay out the variables sequentially in the stack:
00 | y dd ?
04 | buf db 16 dup ?
Which can be thought ...
.text:00000000004004B9 opt = byte ptr -2
.text:00000000004004B9 decode = byte ptr -1
^ Isn't that part what you're looking for?
var int64_t var_2h @ rbp-0x2
var uint32_t var_1h @ rbp-0x1
Additionally, IDA correctly detected that those local variables only occupy one byte each, whereas radare2 thought there are 64 and 32-bit integers (...
One common issue I’ve seen in real programs is the NULL pointer which has the same value as the integer 0. For example, currently (2020) the Hex-Rays decompiler does not support one variable holding different types so for example when a register initialized with zero is used as integer in one branch and as pointer in another, you might see “funny” output. ...