Skip to content

Commit 96f5287

Browse files
committed
Fix warnings in lfortran_intrinsics.c
1 parent 97b17c6 commit 96f5287

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libasr/runtime/lfortran_intrinsics.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,15 +1372,15 @@ LFORTRAN_API void _lfortran_read_int32(int32_t *p, int32_t unit_num)
13721372
if (unit_num == -1) {
13731373
// Read from stdin
13741374
FILE *fp = fdopen(0, "r+");
1375-
fread(p, sizeof(int32_t), 1, fp);
1375+
(void)fread(p, sizeof(int32_t), 1, fp);
13761376
fclose(fp);
13771377
return;
13781378
}
13791379
if (!unit_to_file[unit_num]) {
13801380
printf("No file found with given unit\n");
13811381
exit(1);
13821382
}
1383-
fread(p, sizeof(int32_t), 1, unit_to_file[unit_num]);
1383+
(void)fread(p, sizeof(int32_t), 1, unit_to_file[unit_num]);
13841384
}
13851385

13861386
LFORTRAN_API void _lfortran_read_char(char **p, int32_t unit_num)
@@ -1389,7 +1389,7 @@ LFORTRAN_API void _lfortran_read_char(char **p, int32_t unit_num)
13891389
// Read from stdin
13901390
*p = (char*)malloc(16);
13911391
FILE *fp = fdopen(0, "r+");
1392-
fread(*p, sizeof(char), 16, fp);
1392+
(void)fread(*p, sizeof(char), 16, fp);
13931393
fclose(fp);
13941394
return;
13951395
}
@@ -1398,7 +1398,7 @@ LFORTRAN_API void _lfortran_read_char(char **p, int32_t unit_num)
13981398
exit(1);
13991399
}
14001400
*p = (char*)malloc(16);
1401-
fread(*p, sizeof(char), 16, unit_to_file[unit_num]);
1401+
(void)fread(*p, sizeof(char), 16, unit_to_file[unit_num]);
14021402
}
14031403

14041404
LFORTRAN_API char* _lpython_read(int64_t fd, int64_t n)

0 commit comments

Comments
 (0)