mirror of
https://github.com/codeplea/genann.git
synced 2025-10-03 08:42:44 +00:00
example4: Fix unused-result warning for fgets()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
This commit is contained in:
@@ -42,7 +42,10 @@ void load_data() {
|
|||||||
double *c = class + i * 3;
|
double *c = class + i * 3;
|
||||||
c[0] = c[1] = c[2] = 0.0;
|
c[0] = c[1] = c[2] = 0.0;
|
||||||
|
|
||||||
fgets(line, 1024, in);
|
if (fgets(line, 1024, in) == NULL) {
|
||||||
|
perror("fgets");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
char *split = strtok(line, ",");
|
char *split = strtok(line, ",");
|
||||||
for (j = 0; j < 4; ++j) {
|
for (j = 0; j < 4; ++j) {
|
||||||
|
Reference in New Issue
Block a user