警告:左移计数> =类型的宽度[-wshift-count-overflow]
我有这个问题吗? 警告:左移计数> =类型的宽度[-wshift-count-overflow] *sensor_time =(uint32_t)(((msb<< 16)|(xlsb<< 8)| lsb);
i got this problem?
warning: left shift count >= width of type [-Wshift-count-overflow]
*sensor_time = (uint32_t)((msb << 16) | (xlsb << 8) | lsb);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
长期可能是32位或64位类型,具体取决于您的系统,1仍然是INT。您需要使用l后缀使1个长int,如下所示:
在下面尝试代码
或
long may be a 32-bit or 64-bit type depending on your system, 1 is still an int. You need to make 1 a long int using the L suffix as shown below:
try code below
or