thesourcerer8 / hddsuperclone

HDDSuperClone, HDDSuperTool
GNU General Public License v2.0
394 stars 32 forks source link

Enable Compiler optimization, wrap strncpy() #19

Closed SomeCrazyGuy closed 2 years ago

SomeCrazyGuy commented 2 years ago

The code now compiles with no warnings with -O2 level optimization. I wrapped all uses of strncpy() with a quick hack that should NULL terminate the string (like strlcpy) but also warn on the console any time the destination buffer was not large enough for the source. Any issues located should be fixed before the next release and the eventually the wrapper will no longer be needed.