编译告警“warning: this decimal constant is unsigned only in ISO C90”
来源:互联网 发布:黑暗之魂2网络延迟 编辑:程序博客网 时间:2024/05/11 21:00
产生告警的代码如下:
status = PerEnConstrainedUnsigned(ptCurCtx,ptVal->count_Uplink,0,4294967295);
函数PerEnConstrainedUnsigned的声明如下:
ASN1STATUS PerEnConstrainedUnsigned(Asn1Ctxt* ctxt, ASN1UINT value, ASN1UINT lower, ASN1UINT upper)
告警发生的原因:
C语言里面的常量默认是一个32位的有符号整型数。
对于4294967295,由于无法用32位的有符号整型数表示,所以会报警告。
解决方法是这样:
status = PerEnConstrainedUnsigned(ptCurCtx,ptVal->count_Uplink,0,4294967295UL);
0 0
- 编译告警“warning: this decimal constant is unsigned only in ISO C90”
- warning: this decimal constant is unsigned only in ISO C90
- warning: this decimal constant is unsigned only in ISO C90
- warning: this decimal constant is unsigned only in ISO C90
- warning: this decimal constant is unsigned only in ISO C90
- warning: this decimal constant is unsigned only in ISO C90解决办法
- “warning: this decimal constant is unsigned only in ISO C90”的解决办法
- decimal constant is so large that it is unsigned
- warning: ISO C90 forbids mixed declaration
- 编译告警:“warning: format '%d' expects type 'int', but argument 4 has type 'unsigned long'”
- warning:ISO C90 forbids mixed declarations and code
- warning:ISO C90 forbids mixed declarations and code
- warning:ISO C90 forbids mixed declarations and code
- warning: ISO C90 forbids mixed declarations and code
- warning:ISO C90 forbids mixed declarations and code
- KeilMDK编译警告:warning: #514-D: pointless comparison of unsigned integer with a negative constant
- IAR编译 Warning[Pa082]:undefined behavior: the order of volatile accesses is undefined in this stateme
- 编译警告:ISO C90 forbids mixed declarations and code
- 对MySQL DELETE语法的详细解析
- Android Sensor感应器介绍(三)Sensor类介绍
- in与exist , not in与not exist 的区别
- angular $log
- Oracle E-Business Suite 12.2 is Released!!!
- 编译告警“warning: this decimal constant is unsigned only in ISO C90”
- Java NIO框架Netty教程(三) – Object对象传递
- 32的 USART1 用 DMA 方式发送与接收 转
- 迷路的程序员
- map 遍历
- 报错ld-linux.so
- 电容
- linux alsa pcm 播放声音
- 解决VS2010升级SP1后出现的warning C4005问题