From 47efe6b3b3f3fa583726bcf3af16aa62b33b29d0 Mon Sep 17 00:00:00 2001 From: Damian Rouson Date: Sat, 20 Jul 2024 19:48:39 -0700 Subject: [PATCH 1/2] chore(vector_test_desc): tighten scoping of assert This commit move a "use assert_m.." statement from a module to its child submodule to eliminate a NAG compiler warning related to the imported entity not being used in the module. --- src/julienne/julienne_vector_test_description_m.f90 | 1 - src/julienne/julienne_vector_test_description_s.f90 | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/julienne/julienne_vector_test_description_m.f90 b/src/julienne/julienne_vector_test_description_m.f90 index e6cf58dd..32d5eb22 100644 --- a/src/julienne/julienne_vector_test_description_m.f90 +++ b/src/julienne/julienne_vector_test_description_m.f90 @@ -4,7 +4,6 @@ module julienne_vector_test_description_m !! Define an abstraction for describing test intentions and array-valued test functions use julienne_string_m, only : string_t use julienne_test_result_m, only : test_result_t - use assert_m, only : assert implicit none private diff --git a/src/julienne/julienne_vector_test_description_s.f90 b/src/julienne/julienne_vector_test_description_s.f90 index 608860f2..7b996cae 100644 --- a/src/julienne/julienne_vector_test_description_s.f90 +++ b/src/julienne/julienne_vector_test_description_s.f90 @@ -1,4 +1,5 @@ submodule(julienne_vector_test_description_m) julienne_vector_test_description_s + use assert_m, only : assert implicit none contains From e160e14db71b9523265e4cbac642589a40f08088 Mon Sep 17 00:00:00 2001 From: Damian Rouson Date: Sat, 20 Jul 2024 19:56:47 -0700 Subject: [PATCH 2/2] 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