Fix undefined behavior in RSL_LITE (#1765)
TYPE: bug fix
KEYWORDS: RSL_LITE
SOURCE: Florian Sammüller (Universität Bayreuth, Germany)
DESCRIPTION OF CHANGES:
Problem:
RSL_LITE has undefined behavior due to implicitly declared functions.
This may lead to a crash of `wrf.exe` in the initialization of nested domains if WRF is built with link-time optimization and with recent compilers (e.g. GCC 12).
Solution:
Declare rsl_free() and destroy_list() before first use.
ISSUE:
Fixes #1764
LIST OF MODIFIED FILES:
M external/RSL_LITE/rsl_bcast.c
M external/RSL_LITE/rsl_lite.h
TESTS CONDUCTED:
It passed regression tests.
RELEASE NOTE: Fixed an undefined behavior of RSL_LITE due to implicitly declared functions, which might lead to a model abort when using GCC 12.