pref: 修改逐飞关于 uint32 和 int32 的定义,使其符合静态检查规则
This commit is contained in:
@@ -50,14 +50,20 @@
|
|||||||
#if USE_ZF_TYPEDEF
|
#if USE_ZF_TYPEDEF
|
||||||
// 数据类型声明
|
// 数据类型声明
|
||||||
// 尽量使用 stdint.h 定义的类型名称 避免冲突 这里可以裁剪
|
// 尽量使用 stdint.h 定义的类型名称 避免冲突 这里可以裁剪
|
||||||
|
|
||||||
|
// 上面话说的挺好,uint32(aka unsigned int) 和 uint32_t(aka unsigned long) 不一致
|
||||||
|
// 虽然在 32 位机上都是四字节,但是静态检查总会有提示,很不爽,等下改掉
|
||||||
|
// typedef unsigned int uint32; // 无符号 32 bits
|
||||||
|
|
||||||
typedef unsigned char uint8; // 无符号 8 bits
|
typedef unsigned char uint8; // 无符号 8 bits
|
||||||
typedef unsigned short int uint16; // 无符号 16 bits
|
typedef unsigned short uint16; // 无符号 16 bits
|
||||||
typedef unsigned int uint32; // 无符号 32 bits
|
|
||||||
|
typedef unsigned long uint32; // 无符号 32 bits
|
||||||
typedef unsigned long long uint64; // 无符号 64 bits
|
typedef unsigned long long uint64; // 无符号 64 bits
|
||||||
|
|
||||||
typedef signed char int8; // 有符号 8 bits
|
typedef signed char int8; // 有符号 8 bits
|
||||||
typedef signed short int int16; // 有符号 16 bits
|
typedef signed short int16; // 有符号 16 bits
|
||||||
typedef signed int int32; // 有符号 32 bits
|
typedef signed long int32; // 有符号 32 bits
|
||||||
typedef signed long long int64; // 有符号 64 bits
|
typedef signed long long int64; // 有符号 64 bits
|
||||||
|
|
||||||
typedef volatile uint8 vuint8; // 易变性修饰 无符号 8 bits
|
typedef volatile uint8 vuint8; // 易变性修饰 无符号 8 bits
|
||||||
|
|||||||
Reference in New Issue
Block a user