Use const volatile cast on KEYPATH macro to suppress compiler warning