Skip to content

Commit

Permalink
chore: elim nagfor warning about unset variable
Browse files Browse the repository at this point in the history
  • Loading branch information
rouson committed Jul 21, 2024
1 parent 47efe6b commit e160e14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/julienne/julienne_file_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ function line_lengths(file_unit) result(lengths)
do line_num = 1, num_lines
do
read(file_unit, '(a)', advance='no', iostat=io_status, iomsg=error_message) c
associate(eliminate_nagfor_warning => c) ! eliminates "variable c set but never referenced" warning
end associate
if (io_status==iostat_eor .or. io_status==iostat_end) exit
lengths(line_num) = lengths(line_num) + 1
end do
Expand Down

0 comments on commit e160e14

Please sign in to comment.