From e160e14db71b9523265e4cbac642589a40f08088 Mon Sep 17 00:00:00 2001 From: Damian Rouson Date: Sat, 20 Jul 2024 19:56:47 -0700 Subject: [PATCH] chore: elim nagfor warning about unset variable --- src/julienne/julienne_file_s.f90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/julienne/julienne_file_s.f90 b/src/julienne/julienne_file_s.f90 index 872bbe3f..b3f29dcd 100644 --- a/src/julienne/julienne_file_s.f90 +++ b/src/julienne/julienne_file_s.f90 @@ -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