mirror of
https://gitee.com/const-zpc/param.git
synced 2025-01-30 04:32:52 +08:00
🎈 perf: 消除某些平台出现的编译警告问题
This commit is contained in:
parent
4b78f6977f
commit
6e05f60dc6
@ -82,7 +82,7 @@
|
||||
#if COT_PARAM_USE_CUSTOM_CHECK
|
||||
#if (COT_PARAM_NAME_MAX_LENGTH > 1)
|
||||
#define COT_PARAM_ITEM_BIND_NUM_DEF_RANGE_IMPL(_id, _name, _variable, _type, _length, _attr, _defVal, _minVal, _maxVal, _check) { \
|
||||
.name = {.textId = (size_t)(_name), .pTextString = (char*)(_name)}, \
|
||||
.name = {.pVoid = (void *)(_name)}, \
|
||||
.id = _id, .type = _type, .length = _length, .attr = _attr, \
|
||||
.unCurValuePtr.pVoid = _variable, .unDefValuePtr.pVoid = _defVal, \
|
||||
.unMinValuePtr.pVoid = _minVal, .unMaxValuePtr.pVoid = _maxVal, .pfnParamCheck = _check}
|
||||
@ -96,7 +96,7 @@
|
||||
#else
|
||||
#if (COT_PARAM_NAME_MAX_LENGTH > 1)
|
||||
#define COT_PARAM_ITEM_BIND_NUM_DEF_RANGE_IMPL(_id, _name, _variable, _type, _length, _attr, _defVal, _minVal, _maxVal, _check) { \
|
||||
.name = {.textId = (size_t)(_name), .pTextString = (char*)(_name)}, \
|
||||
.name = {.pVoid = (void *)(_name)}, \
|
||||
.id = _id, .type = _type, .length = _length, .attr = _attr, \
|
||||
.unCurValuePtr.pVoid = _variable, .unDefValuePtr.pVoid = _defVal, \
|
||||
.unMinValuePtr.pVoid = _minVal, .unMaxValuePtr.pVoid = _maxVal}
|
||||
|
@ -119,6 +119,8 @@ typedef int (*cotParamCheck_f)(const void *pCurParam);
|
||||
|
||||
typedef union
|
||||
{
|
||||
void *pVoid; /*!< 通用指针(目的消除编译警告) */
|
||||
|
||||
size_t textId; /*!< 文本ID */
|
||||
|
||||
char *pTextString; /*!< 文本字符串 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user