sierrafoxtrot / srecord

SRecord github Mirror
https://srecord.sourceforge.net/
GNU General Public License v3.0
42 stars 22 forks source link

CI: Fail QA on warnings by clang-14 and gcc-11 #27

Closed jtxa closed 1 year ago

jtxa commented 1 year ago

Fixed most warnings for -std=c++11 -pedantic -Wall -Wextra. Disabled only -Wno-implicit-fallthrough on gcc for now. info for older gcc, -pedantic may throw more messages: gcc-8 doesn't like the extra ; on the end of namespace.

Added a gcc-11 build to QA workflow, enabled -Werror for it and clang. Added -k 0 to ninja call, to keep it compiling all files.

jtxa commented 1 year ago

Moved new/delete out of for-loop. Force pushed.

jtxa commented 1 year ago

I assume that all new/delete call in SRecord may be replaced by something more modern; smart pointers and their helper functions or so. At least RAII shall be used, RAII may also be useful elsewhere (I haven't looked how files are opened/closed).

But I did not invest any time on that for now, because this change should be simple & straight forward so we can enforce warning free check soon.

sierrafoxtrot commented 1 year ago

But I did not invest any time on that for now, because this change should be simple & straight forward so we can enforce warning free check soon.

Totally agree with this. Happy to look into RAII and other more modern approaches if there is a solid reason to rewrite. Let's chat!

sierrafoxtrot commented 1 year ago

I stupidly hit close (facepalm). Merging now