warning: integer constant is too large for 'long' type"

时间  :2014-7-11 11:38  调试iHealthGateway和云通信时发现问题 (时间戳TS)
问题:Linux编译时候定义了一个unint64_t = 1405043216129 (64位unsigned long long int 取值范围之内)
           但编译的时候总是出现warning:integer constant is too large for ‘long‘ type"

解决:The warning message can be safely ignored, as mb-gcc is not doing anything wrong; the 64-bit computing is in fact correct.
          This warning occurs because gcc is strict in syntax and requires LL on the end of such constants. This warning message          disappears if the integer is appended with LL.

Fox:uint64_t Time =  1405043216129LL
          pJsonObj       =  GatewayConfigInfoContent(Time);     //该函数是获取网关配置时打包的实体内容,需要参数TS

warning: integer constant is too large for 'long' type"

时间: 2024-10-02 11:26:56

warning: integer constant is too large for 'long' type"的相关文章

warning: integer overflow in expression (take this as a lesson)

#define QUOTA (5*1024*1024*1024) uint64_t ui64 = QUOTA; gcc编译器会报出:warning: integer overflow in expression,你发现哪里出问题了?以此为戒!

java: integer number is too large

今天想定义一个类常量,结果如下面那样定义,确报错了.error is: Integer number too large public static final Long STARTTIME = 1493568000000; 我就去查了下,在后面加上L,就好了,就会作为long类型来处理了,若是不加,则作为int处理,而int是没有这么大的值的.正确的则是 public static final Long STARTTIME = 1493568000000L;1注意: System.curren

c语言中long long类型的赋值

long long unsigned int num = 20140701092715; 在C语言中编译器会把没有小数的数值常量默认为整形,这条语句编译器会报警告: [[email protected] ~]# gcc -o test 1.c 1.c: In function ‘main’: 1.c:6: warning: integer constant is too large for ‘long’ type 为了标识是long long类型,处理方法:将20140701092715指定为l

【转】clang warning 警告清单(备查,建议直接command + F 速查 )

Warning Message -WCFString-literal input conversion stopped due to an input byte that does not belong to the input codeset UTF-8 -WNSObject-attribute __attribute ((NSObject)) may be put on a typedef only, attribute is ignored -Wabstract-vbase-init in

iOS -- warnings

Semantic Warnings Warning Message -WCFString-literal input conversion stopped due to an input byte that does not belong to the input codeset UTF-8 -WNSObject-attribute         __attribute ((NSObject)) may be put on a typedef only, attribute is ignore

IOS 警告 收集

Semantic Warnings Warning Message -WCFString-literal input conversion stopped due to an input byte that does not belong to the input codeset UTF-8 -WNSObject-attribute __attribute ((NSObject)) may be put on a typedef only, attribute is ignored -Wabst

IOS 警告 汇总

Semantic Warnings Warning Message -WCFString-literal input conversion stopped due to an input byte that does not belong to the input codeset UTF-8 -WNSObject-attribute __attribute ((NSObject)) may be put on a typedef only, attribute is ignored -Wabst

iOS编程 手动忽略clang编译器警告

在iOS开发过程中, 我们可能会碰到一些系统方法弃用, weak.循环引用.不能运行之类的警告. 有代码洁癖的孩子们非常想消除他们, 今天就让我们来一次Fuck 警告.! 首先学会主要的语句 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" 这里写出现警告的代码 #pragma clang diagnostic pop 这样就消除了方法弃用的警告. 同理,

iOS:消除项目中警告

引言: 在iOS开发过程中, 我们可能会碰到一些系统方法弃用, weak.循环引用.不能执行之类的警告. 有代码洁癖的孩子们很想消除他们, 今天就让我们来一次Fuck 警告!! 首先学会基本的语句: #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" 中间这里写出现警告的代码 #pragma clang diagnostic pop 这样就消除了方法弃用的警