jelinj8 / dso203

attempt to restore buildability of Wildcat's DSO203 oscilloscope firmware + bugfixes
27 stars 46 forks source link

Fix building on Linux with GCC 8.1 #8

Closed MarSoft closed 6 years ago

MarSoft commented 6 years ago

It added warnings about unguarded blocks, and they were to be fixed because we treat warnings as errors.

ZHNNN commented 6 years ago

Thank you for looking into it. Were you able to confirm that the comment about "limit to +/-2" is wrong and the authors wished to "limit 0 to 4" in Calibrat.c?

MarSoft commented 6 years ago

Yes. The logic in that piece of code is as follows: we first calculate offset, then limit it to -2..+2, then shift it by 2 to get number in range 0..4. And then use that number as an index in CenterStr[5] array. So everything is correct here. Regarding other warnings, I reviewed the code there and decided that the code is correct everywhere - it is just the author's coding style.