Merge pull request #13 from greno4ka/master

Fix non-critical warning: unused result
This commit is contained in:
Murilo Pereira 2017-11-03 17:23:32 +01:00 committed by GitHub
commit 1d1005a2bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,9 @@ void version() {
if (!(version_file = fopen("VERSION", "rb"))) {
tty_solitaire_generic_error(errno, __FILE__, __LINE__);
}
fread(version_string, 1, 5, version_file);
if (!fread(version_string, 1, 5, version_file)) {
// TODO: handle this.
}
version_string[5] = '\0';
printf("%s\n", version_string);
fclose(version_file);