CMake: remove -Wno-unused-result from CXXFLAGS

Also, clean up the remaining fgets() checks.