determine warning lookbehind in terms of SHARE_PERIOD instead of using a magic number