Skip to content

Commit

Permalink
Fix code scanning alert no. 687: Multiplication result converted to l…
Browse files Browse the repository at this point in the history
…arger type

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 492f737 commit ebad784
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gdb/f-valprint.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ f77_print_array_1(int nss, int ndimensions, struct type *type,
{
fprintf_filtered(stream, "( ");
f77_print_array_1((nss + 1), ndimensions, TYPE_TARGET_TYPE(type),
(valaddr + (i * F77_DIM_OFFSET(nss))),
(address + (i * F77_DIM_OFFSET(nss))),
(valaddr + ((CORE_ADDR)i * F77_DIM_OFFSET(nss))),
(address + ((CORE_ADDR)i * F77_DIM_OFFSET(nss))),
stream, format, deref_ref, recurse, pretty, elts);
fprintf_filtered(stream, ") ");
}
Expand All @@ -305,8 +305,8 @@ f77_print_array_1(int nss, int ndimensions, struct type *type,
i++, (*elts)++)
{
val_print(TYPE_TARGET_TYPE(type),
(valaddr + i * F77_DIM_OFFSET(ndimensions)),
0, (address + i * F77_DIM_OFFSET(ndimensions)),
(valaddr + (CORE_ADDR)i * F77_DIM_OFFSET(ndimensions)),
0, (address + (CORE_ADDR)i * F77_DIM_OFFSET(ndimensions)),
stream, format, deref_ref, recurse, pretty);

if (i != (F77_DIM_SIZE(nss) - 1))
Expand Down

0 comments on commit ebad784

Please sign in to comment.