Permalink
Browse files

wcml: Fix some (gfortran) warnings

Including a real bug (trimming input dec lines
on request was not being done).
  • Loading branch information...
1 parent b6a51f3 commit a8174c338fefb0d417289ffdc307a27acc0cedc3 @andreww committed Jan 1, 2013
Showing with 11 additions and 3 deletions.
  1. +6 −2 wcml/m_wcml_inputdec.F90
  2. +2 −0 wcml/m_wcml_molecule.F90
  3. +2 −0 wcml/m_wcml_molecule.m4
  4. +1 −1 wcml/test/test_cmlDumpDec_4.f90
@@ -188,7 +188,11 @@ subroutine wcmlDumpDec_core(xf, inputDec, line_lengths, trim_lines, iostat)
call FoX_error("Error reading file in wcmlDumpDec")
endif
else
- call wcmlAddDecLine(xf, this_line)
+ if (trim_lines) then
+ call wcmlAddDecLine(xf, trim(this_line))
+ else
+ call wcmlAddDecLine(xf, this_line)
+ endif
endif
enddo
@@ -214,7 +218,7 @@ subroutine wcmlStartDecList(xf, id, title)
if (xmlf_GetExtendedData(xf).ne.20) then
call FoX_error("wcmlDumpDec must only be used in CompChem mode.")
endif
- call cmlStartModule(xf, id=id, dictRef='compchem:inputFileList')
+ call cmlStartModule(xf, title=title, id=id, dictRef='compchem:inputFileList')
#endif
end subroutine wcmlStartDecList
@@ -1605,6 +1605,8 @@ subroutine checkBondIdRefs(atomArrayIds, bondAtom1Refs, bondAtom2Refs, nobondche
if (nobondcheck) return ! skip all checks
endif
+ atom1num = -1 ! Supress bogus gfortran warning
+ atom2num = -1
bondmatrix = .false.
natoms = size(atomArrayIds)
nbonds = size(bondAtom1Refs)
@@ -747,6 +747,8 @@ TOHWM4_molecule_subs(`dp')
if (nobondcheck) return ! skip all checks
endif
+ atom1num = -1 ! Supress bogus gfortran warning
+ atom2num = -1
bondmatrix = .false.
natoms = size(atomArrayIds)
nbonds = size(bondAtom1Refs)
@@ -9,7 +9,7 @@ program test
call cmlBeginFile(xf, filename, unit=-1)
call cmlStartCml(xf, compchem=.true.)
call wcmlDumpDec(xf, (/'test_cmlDumpDec_4a.in', &
- 'test_cmlDumpDec_4b.in'/), (/80, 80/), (/.true., .true./))
+ 'test_cmlDumpDec_4b.in'/), (/80, 80/), (/.false., .false./))
call cmlFinishFile(xf)

0 comments on commit a8174c3

Please sign in to comment.