suzukiplan / z80

Single header Z80 emulator for C++ (C++11 or later)
MIT License
55 stars 9 forks source link

Correct warnings #41

Closed JulienNevo closed 2 years ago

JulienNevo commented 2 years ago

I use CLion as an IDE, and it shows many many warnings. On Linux, I compile with GCC 10 which reports a lot of errors. As I like to use the "consider warning as error" option, I have to rely on following pragmas to be able to compile:

#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#pragma GCC diagnostic ignored "-Wtype-limits"

I can provide a list of warnings if you want, but the main one is the use of NULL instead of nullptr. By doing this, you would correct 80% of the warnings :).

suzukiplan commented 2 years ago

Thank you for your report.

We will address the warning, as our stance is basically to fix it completely.

I have confirmed that I was able to clear a set of warnings with G++10 in CI with Pull Request https://github.com/suzukiplan/z80/pull/39