Refine warning

This commit is contained in:
mio
2024-10-02 15:56:34 +08:00
parent 9f935f505e
commit d30ba77c71

View File

@@ -154,13 +154,15 @@ static inline void uc_common_init(struct uc_struct* uc)
ret = UC_ERR_OK; \ ret = UC_ERR_OK; \
} while(0) } while(0)
#define CHECK_RET_DEPRECATE(ret, regid) do { \ #define CHECK_RET_DEPRECATE(ret, regid) do { \
if (ret == UC_ERR_ARG && !getenv("UC_IGNORE_REG_BREAK")) { \ if (ret == UC_ERR_ARG && !getenv("UC_IGNORE_REG_BREAK")) { \
fprintf(stderr, \ fprintf(stderr, \
"WARNING: Your register accessing on id %"PRIu32" is deprecated" \ "WARNING: Your register accessing on id %"PRIu32" is deprecated " \
" and will get UC_ERR_ARG in the future release (2.2.0) because" \ "and will get UC_ERR_ARG in the future release (2.2.0) because " \
" the accessing is either no-op or not defined." \ "the accessing is either no-op or not defined. If you believe " \
" Set UC_IGNORE_REG_BREAK=1 to ignore this warning.\n", \ "the register should be implemented or there is a bug, please " \
"submit an issue to https://github.com/unicorn-engine/unicorn. " \
"Set UC_IGNORE_REG_BREAK=1 to ignore this warning.\n", \
regid); \ regid); \
ret = UC_ERR_OK; \ ret = UC_ERR_OK; \
} \ } \