Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple warnings (ignoring return value) #15

Open
der-stefan opened this issue Feb 26, 2020 · 1 comment
Open

Multiple warnings (ignoring return value) #15

der-stefan opened this issue Feb 26, 2020 · 1 comment

Comments

@der-stefan
Copy link
Collaborator

@hoche: Do you consider the warnings "ignoring return value" of numerous fgets and fscanf calls as relevant to be fixed? Should we add the compiler flag -Wno-unused-variable to cmake or rather catch their return values? It is desirable to compile without warnings in order to not lose sight of more important warnings like #14.

@hoche
Copy link
Owner

hoche commented Feb 26, 2020

Those and the fgets/fscanf buffer size mismatches have been driving me crazy since I started fiddling with this code and the only reason I haven't already dealt with them is that I want to move all of that to std::string and iostreams.

As it stands now, we should be checking all those return values because that's the only way you know whether the conversion worked properly and whether you can go ahead, or need to error out, or gripe but use default values. It's not worth fixing if we're going to rewrite all that, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants