From f43152c420fb7b2084943b51ea27b6cf4899df89 Mon Sep 17 00:00:00 2001 From: Grigory Ustinov Date: Wed, 1 Nov 2017 21:28:38 +0300 Subject: [PATCH 1/2] Fix non-critical warning: unused result --- src/ttysolitaire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ttysolitaire.c b/src/ttysolitaire.c index 1861f3f..bad57af 100644 --- a/src/ttysolitaire.c +++ b/src/ttysolitaire.c @@ -129,7 +129,7 @@ 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)); version_string[5] = '\0'; printf("%s\n", version_string); fclose(version_file); From 9df1e4b1756da8893d30c5fe19bbef6a5cc0e026 Mon Sep 17 00:00:00 2001 From: Murilo Pereira Date: Thu, 2 Nov 2017 18:58:46 +0100 Subject: [PATCH 2/2] Fix compilation warning. --- src/ttysolitaire.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ttysolitaire.c b/src/ttysolitaire.c index bad57af..b7091a1 100644 --- a/src/ttysolitaire.c +++ b/src/ttysolitaire.c @@ -129,7 +129,9 @@ void version() { if (!(version_file = fopen("VERSION", "rb"))) { tty_solitaire_generic_error(errno, __FILE__, __LINE__); } - if (!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);