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

[small] tidy up warnings #2323

Merged
merged 9 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration_tests/modules_02.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from modules_02b import f, f
from modules_02b import f
from lpython import i32

def main0():
Expand Down
16 changes: 14 additions & 2 deletions src/libasr/runtime/lfortran_intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,13 @@ LFORTRAN_API void _lfortran_read_int64(int64_t *p, int32_t unit_num)
{
if (unit_num == -1) {
// Read from stdin
scanf("%lld", p);
scanf(
#ifdef HAVE_LFORTRAN_MACHO
"%lld"
#else
"%ld"
#endif
, p);
return;
}

Expand All @@ -2005,7 +2011,13 @@ LFORTRAN_API void _lfortran_read_int64(int64_t *p, int32_t unit_num)
if (unit_file_bin) {
fread(p, sizeof(*p), 1, filep);
} else {
fscanf(filep, "%lld", p);
fscanf(filep,
#ifdef HAVE_LFORTRAN_MACHO
"%lld"
#else
"%ld"
#endif
, p);
}
}

Expand Down
6 changes: 3 additions & 3 deletions tests/reference/asr-modules_02-ec92e6f.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"basename": "asr-modules_02-ec92e6f",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/../integration_tests/modules_02.py",
"infile_hash": "c3ce0b2b9780f27f787297f75e5477e990481b962dcee420809540e0",
"infile_hash": "dcb00ac27cbbcdec61d81f1df9e852ba81a2197e7804ec89cab76e44",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-modules_02-ec92e6f.stdout",
"stdout_hash": "20ce6ad550f4e6b83356075795a39dafee13dc48bebf2eaf65d13edd",
"stderr": "asr-modules_02-ec92e6f.stderr",
"stderr_hash": "132af04271d3bfd523848990e734bfa3c0aed6e4b85ec4eb87e66720",
"stderr": null,
"stderr_hash": null,
"returncode": 0
}
8 changes: 4 additions & 4 deletions tests/reference/asr_json-modules_02-53952e6.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"basename": "asr_json-modules_02-53952e6",
"cmd": "lpython --show-asr --json --no-color {infile} -o {outfile}",
"infile": "tests/../integration_tests/modules_02.py",
"infile_hash": "c3ce0b2b9780f27f787297f75e5477e990481b962dcee420809540e0",
"infile_hash": "dcb00ac27cbbcdec61d81f1df9e852ba81a2197e7804ec89cab76e44",
"outfile": null,
"outfile_hash": null,
"stdout": "asr_json-modules_02-53952e6.stdout",
"stdout_hash": "c6ddff7faf420128366955f59e91126e3edb9c0367caed8c333562ec",
"stderr": "asr_json-modules_02-53952e6.stderr",
"stderr_hash": "132af04271d3bfd523848990e734bfa3c0aed6e4b85ec4eb87e66720",
"stdout_hash": "c97d528fedb41f6d0e8bfa0cee1c0c9333844130b7694cb0cd5e2c4c",
"stderr": null,
"stderr_hash": null,
"returncode": 0
}
Loading