warning: right shift count >= width of type
来源:互联网 发布:js搅拌机型号 编辑:程序博客网 时间:2024/05/01 05:59
linux上编译mkyaffs2image工具, 出现如下警告:
src/main.c:18: warning: right shift count >= width of type。
代码如下:
int func(void){
int file_size_low, file_size_high;
...
stat("./inittab", &s);
file_size_low = s.st_size;
file_size_high = s.st_size>>32; //引起警告的语句
...
}
s.st_size向右移32位,为引起警告?s.st_size是long int类型,在32位的linux系统是32位,而不是64位。右移位数为32%32= 0, 所以file_size_hight = file_size_low = s.st_size。
在arm中long类型是至少32位, long long int是64位
0 0
- warning: right shift count >= width of type
- warning: left shift count >= width of type
- left shift count >= width of type [enabled by default]
- DFSORT之shift right
- JS unsigned right shift
- [memo]left shift, right shift[on x86]
- warning:cannot pass objects of non-POD type
- warning:cannot pass objects of non-POD type
- warning: pointer of type 'void *' used in arithmetic
- warning: control reaches end of non-void function [-Wreturn-type]
- warning: control reaches end of non-void function [-Wreturn-type]
- warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits
- warning: format ‘%s’ expects argument of type ‘char *’和warning: backslash and newline separated by
- <input type=“text” name="">width设定无效
- [原创]Warning: Failed prop type: Invalid prop `enablesReturnKeyAutomatically` of type `string` supplie
- Warning: Failed prop type: Invalid prop `enablesReturnKeyAutomatically` of type `string` supplie
- Warning: Failed prop type: Invalid prop `enablesReturnKeyAutomatically` of type `string` supplie
- find maximized count of 0 on left and 1 on right in binary array
- 算法导论 9.3-6 k分位数
- MacBook Pro 安装 FusionDrive
- HTTP头信息中的参数Etag
- Qt在mini2440下的触摸屏失效和库文件找不到问题的解决
- Google服务器架构图解简析
- warning: right shift count >= width of type
- 大型高并发高负载网站的系统架构
- 多边形问题( 判断一个点在不在多边形内)
- opencv 卡尔曼滤波器例子,自己修改过
- MVC3的404页面设置的方法
- UVA10791- Minimum Sum LCM
- 超级负载均衡
- Java中线程池创建与使用
- 嵌入式---中断