Fixed warning message encountered with -std=f2003

This commit is contained in:
Karl Hammond
2022-12-22 22:09:20 -06:00
parent 44e6078437
commit 992ef989b3

View File

@ -333,6 +333,10 @@ MODULE LIBLAMMPS
CLASS(*), POINTER :: caller => NULL()
CLASS(lammps), POINTER :: lammps_instance => NULL()
END TYPE fix_external_data
! constructor to make Fortran 2003 compilers happy (F2008 should be OK)
INTERFACE fix_external_data
MODULE PROCEDURE construct_fix_external_data
END INTERFACE fix_external_data
! Array used to store Fortran-facing callback functions for fix external
TYPE(fix_external_data), DIMENSION(:), ALLOCATABLE, TARGET, SAVE :: ext_data
@ -2786,6 +2790,12 @@ CONTAINS
END IF
END SUBROUTINE lmp_decode_image_flags_bigbig
! constructor for fix_external_data that avoids a warning with Fortran 2003
! compilers
TYPE(fix_external_data) FUNCTION construct_fix_external_data()
construct_fix_external_data%id = ''
END FUNCTION construct_fix_external_data
! equivalent function to lammps_set_fix_external_callback for -DSMALLSMALL
! note that "caller" is wrapped into a fix_external_data derived type along
! with the fix id and the Fortran calling function.