modified ts_detsys.adb for a compiler warning