From 63a30f062a115e1615ac1e21ce0cd1e55d935532 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Wed, 18 Feb 2015 13:56:41 -0500 Subject: [PATCH] Removed DEPRECATION prefix from warnings in #313 --- src/error.F90 | 34 ++++++++++------------------------ src/input_xml.F90 | 4 ++-- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/src/error.F90 b/src/error.F90 index 803a0617cf..77f663108f 100644 --- a/src/error.F90 +++ b/src/error.F90 @@ -18,36 +18,24 @@ contains ! stream. !=============================================================================== - subroutine warning(message_in, deprecation) + subroutine warning(message) - character(*) :: message_in ! printed with the warning - logical, optional, intent(in) :: deprecation ! is a depreciation warning + character(*) :: message - integer :: i_start ! starting position - integer :: i_end ! ending position - integer :: line_wrap ! length of line - integer :: length ! length of message - integer :: indent ! length of indentation - character(:), allocatable :: message ! input message with a prefix + integer :: i_start ! starting position + integer :: i_end ! ending position + integer :: line_wrap ! length of line + integer :: length ! length of message + integer :: indent ! length of indentation + + ! Write warning at beginning + write(ERROR_UNIT, fmt='(1X,A)', advance='no') 'WARNING: ' ! Set line wrapping and indentation line_wrap = 80 indent = 10 ! Determine length of message - length = len_trim(message_in) - - ! Prefix the message - if (.not. present(deprecation)) then - allocate(character(length+9) :: message) - message = 'WARNING: ' // message_in - else if (deprecation) then - allocate(character(length+23) :: message) - message = 'DEPRECATION WARNING: ' // message_in - else - allocate(character(length+9) :: message) - message = 'WARNING: ' // message_in - end if length = len_trim(message) i_start = 0 @@ -80,8 +68,6 @@ contains end if end do - deallocate(message) - end subroutine warning !=============================================================================== diff --git a/src/input_xml.F90 b/src/input_xml.F90 index f009fa8101..e9204ecd3e 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -1300,7 +1300,7 @@ contains call warning("The use of 'width' is deprecated and will be disallowed & &in a future release. Use 'pitch' instead. The utility openmc/& &src/utils/update_inputs.py can be used to automatically update & - &geometry.xml files.", deprecation=.true.) + &geometry.xml files.") if (get_arraysize_double(node_lat, "width") /= n) then call fatal_error("Number of entries on must be the same as & &the number of entries on .") @@ -1323,7 +1323,7 @@ contains if (check_for_node(node_lat, "type")) then call warning("The use of 'type' is no longer needed. The utility & &openmc/src/utils/update_inputs.py can be used to automatically & - &update geometry.xml files.", deprecation=.true.) + &update geometry.xml files.") end if ! Copy number of dimensions